TextAttributes (@NotNull TextAttributes attributes) { TextAttributes backgroundAttrs = attributes.clone(); backgroundAttrs.setBackgroundColor(attributes.getForegroundColor()); backgroundAttrs.setForegroundColor(null); return backgroundAttrs; }