ConsoleViewContentType ( @NotNull String attribute, int backgroundColorIndex, int foregroundColorIndex, @Nullable Color enforcedBackgroundColor, @Nullable Color enforcedForegroundColor, boolean inverse, @NotNull java.util.List<EffectType> effectTypes, int fontType ) { TextAttributes attrs = new TextAttributes(); attrs.setEffectType(null); // re-setting default BOX if (fontType != -1) { attrs.setFontType(fontType); } Color foregroundColor = getColor(foregroundColorIndex, enforcedForegroundColor, ColoredOutputTypeRegistryImpl::getDefaultForegroundColor); Color backgroundColor = getColor(backgroundColorIndex, enforcedBackgroundColor, ColoredOutputTypeRegistryImpl::getDefaultBackgroundColor); if (inverse) { attrs.setForegroundColor(backgroundColor); attrs.setEffectColor(backgroundColor); attrs.setBackgroundColor(foregroundColor); effectTypes.forEach(it -> attrs.withAdditionalEffect(it, backgroundColor)); } else { attrs.setForegroundColor(foregroundColor); attrs.setEffectColor(foregroundColor); attrs.setBackgroundColor(backgroundColor); effectTypes.forEach(it -> attrs.withAdditionalEffect(it, foregroundColor)); } return new ConsoleViewContentType(attribute, attrs); }