EditorColorsScheme (@Nullable Color background) { EditorColorsScheme globalScheme = EditorColorsManager.getInstance().getGlobalScheme(); boolean dark1 = background == null ? StartupUiUtil.isUnderDarcula() : ColorUtil.isDark(background); boolean dark2 = ColorUtil.isDark(globalScheme.getDefaultBackground()); if (dark1 != dark2) { EditorColorsScheme scheme = EditorColorsManager.getInstance().getScheme(dark1 ? "Darcula" : EditorColorsScheme.DEFAULT_SCHEME_NAME); if (scheme != null) { return scheme; } } return globalScheme; }