Color (@Nullable TextAttributes attributes, @NotNull EditorColorsScheme colorScheme) { if (attributes == null) return null; if (attributes.getErrorStripeColor() != null) return attributes.getErrorStripeColor(); if (attributes.getBackgroundColor() != null) { boolean isDark = ColorUtil.isDark(colorScheme.getDefaultBackground()); return isDark ? attributes.getBackgroundColor().brighter() : attributes.getBackgroundColor().darker(); } return null; }