SimpleTextAttributes (final SimpleTextAttributes weak, final SimpleTextAttributes strong) { final int style = strong.getStyle() | weak.getStyle(); final Color wave; if (!Comparing.equal(strong.getWaveColor(), REGULAR_ATTRIBUTES.getWaveColor())) { wave = strong.getWaveColor(); } else { wave = weak.getWaveColor(); } final Color fg; if (!Comparing.equal(strong.getFgColor(), REGULAR_ATTRIBUTES.getFgColor())) { fg = strong.getFgColor(); } else { fg = weak.getFgColor(); } final Color bg; if (!Comparing.equal(strong.getBgColor(), REGULAR_ATTRIBUTES.getBgColor())) { bg = strong.getBgColor(); } else { bg = weak.getBgColor(); } return new SimpleTextAttributes(bg, fg, wave, style); }