Interface SubstanceColorScheme
-
- All Superinterfaces:
SchemeBaseColors,SchemeDerivedColors,SubstanceTrait
- All Known Implementing Classes:
AquaColorScheme,BarbyPinkColorScheme,BaseColorScheme,BaseDarkColorScheme,BaseLightColorScheme,BottleGreenColorScheme,BrownColorScheme,CharcoalColorScheme,CremeColorScheme,DarkGrayColorScheme,DarkMetallicColorScheme,DarkVioletColorScheme,DesertSandColorScheme,EbonyColorScheme,JadeForestColorScheme,LightAquaColorScheme,LightGrayColorScheme,LimeGreenColorScheme,MetallicColorScheme,OliveColorScheme,OrangeColorScheme,PurpleColorScheme,RaspberryColorScheme,SepiaColorScheme,SteelBlueColorScheme,SunfireRedColorScheme,SunGlareColorScheme,SunsetColorScheme,TerracottaColorScheme,UltramarineColorScheme
public interface SubstanceColorScheme extends SubstanceTrait, SchemeBaseColors, SchemeDerivedColors
General interface for color schemes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SubstanceColorSchemeblendWith(SubstanceColorScheme otherScheme, double likenessToThisScheme)Creates a blended version ofthiscolor scheme based on another color scheme.SubstanceColorSchemehueShift(double hueShiftFactor)Creates a hue-shifted (in HSB space) version ofthiscolor scheme.SubstanceColorSchemeinvert()Creates an inverted version ofthisscheme.booleanisDark()Returns indication whether this color scheme uses dark colors.SubstanceColorSchemenamed(java.lang.String colorSchemeDisplayName)This method is a fluent-interface builder utility for setting the display name for this color scheme.SubstanceColorSchemenegate()Creates a negated version ofthisscheme.SubstanceColorSchemesaturate(double saturateFactor)Creates a saturated or desaturated version ofthisscheme.SubstanceColorSchemeshade(double shadeFactor)Creates a shaded (shifted towards black) version ofthiscolor scheme.SubstanceColorSchemeshift(java.awt.Color backgroundShiftColor, double backgroundShiftFactor, java.awt.Color foregroundShiftColor, double foregroundShiftFactor)Creates a shift version ofthisscheme.SubstanceColorSchemeshiftBackground(java.awt.Color backgroundShiftColor, double backgroundShiftFactor)Creates a shift version ofthisscheme.SubstanceColorSchemetint(double tintFactor)Creates a tinted (shifted towards white) version ofthiscolor scheme.SubstanceColorSchemetone(double toneFactor)Creates a toned (shifted towards gray) version ofthiscolor scheme.-
Methods inherited from interface org.pushingpixels.substance.api.colorscheme.SchemeBaseColors
getDarkColor, getExtraLightColor, getForegroundColor, getLightColor, getMidColor, getUltraDarkColor, getUltraLightColor, toImage
-
Methods inherited from interface org.pushingpixels.substance.api.colorscheme.SchemeDerivedColors
getAccentedBackgroundFillColor, getBackgroundFillColor, getEchoColor, getFocusRingColor, getLineColor, getMarkColor, getSelectionBackgroundColor, getSelectionForegroundColor, getSeparatorPrimaryColor, getSeparatorSecondaryColor, getTextBackgroundFillColor
-
Methods inherited from interface org.pushingpixels.substance.api.trait.SubstanceTrait
getDisplayName
-
-
-
-
Method Detail
-
isDark
boolean isDark()
Returns indication whether this color scheme uses dark colors. Note that this method may be removed in the future. It is highly recommended to use one of the colors from the parentSchemeBaseColorsandSchemeDerivedColorsinterfaces instead.- Returns:
trueif this color scheme uses dark colors,falseotherwise.
-
shift
SubstanceColorScheme shift(java.awt.Color backgroundShiftColor, double backgroundShiftFactor, java.awt.Color foregroundShiftColor, double foregroundShiftFactor)
Creates a shift version ofthisscheme.- Parameters:
backgroundShiftColor- Shift color for background colors. Should have full opacity.backgroundShiftFactor- Value in 0.0...1.0 range. Larger values shift more towards the specified color.foregroundShiftColor- Shift color for foreground colors. Should have full opacity.foregroundShiftFactor- Value in 0.0...1.0 range. Larger values shift more towards the specified color.- Returns:
- Shift version of
thisscheme.
-
shiftBackground
SubstanceColorScheme shiftBackground(java.awt.Color backgroundShiftColor, double backgroundShiftFactor)
Creates a shift version ofthisscheme.- Parameters:
backgroundShiftColor- Shift color for background colors. Should have full opacity.backgroundShiftFactor- Value in 0.0...1.0 range. Larger values shift more towards the specified color.- Returns:
- Shift version of
thisscheme that does not change the foreground color.
-
tint
SubstanceColorScheme tint(double tintFactor)
Creates a tinted (shifted towards white) version ofthiscolor scheme.- Parameters:
tintFactor- Value in 0.0...1.0 range. Larger values shift more towards white color.- Returns:
- Tinted version of
thisscheme.
-
tone
SubstanceColorScheme tone(double toneFactor)
Creates a toned (shifted towards gray) version ofthiscolor scheme.- Parameters:
toneFactor- Value in 0.0...1.0 range. Larger values shift more towards gray color.- Returns:
- Toned version of
thisscheme.
-
shade
SubstanceColorScheme shade(double shadeFactor)
Creates a shaded (shifted towards black) version ofthiscolor scheme.- Parameters:
shadeFactor- Value in 0.0...1.0 range. Larger values shift more towards black color.- Returns:
- Shaded version of
thisscheme.
-
saturate
SubstanceColorScheme saturate(double saturateFactor)
Creates a saturated or desaturated version ofthisscheme. The value and brightness stay the same.- Parameters:
saturateFactor- Value in -1.0...1.0 range. Positive values create more saturated colors. Negative values create more desaturated colors.- Returns:
- Saturated version of
thisscheme.
-
invert
SubstanceColorScheme invert()
Creates an inverted version ofthisscheme.- Returns:
- Inverted version of
thisscheme.
-
negate
SubstanceColorScheme negate()
Creates a negated version ofthisscheme.- Returns:
- Negated version of
thisscheme.
-
hueShift
SubstanceColorScheme hueShift(double hueShiftFactor)
Creates a hue-shifted (in HSB space) version ofthiscolor scheme.- Parameters:
hueShiftFactor- Value in -1.0...1.0 range.- Returns:
- Hue-shifted version of
thisscheme.
-
blendWith
SubstanceColorScheme blendWith(SubstanceColorScheme otherScheme, double likenessToThisScheme)
Creates a blended version ofthiscolor scheme based on another color scheme.- Parameters:
otherScheme- The other color scheme for blending colors.likenessToThisScheme- Defines how close the colors of the resulting color scheme are to this scheme. Value of 1.0 returns a color scheme with the exact colors of this color scheme. Value of 0.0 returns a color scheme with the exact colors of the other color scheme.- Returns:
- Blended color scheme.
-
named
SubstanceColorScheme named(java.lang.String colorSchemeDisplayName)
This method is a fluent-interface builder utility for setting the display name for this color scheme. The implementation must return the samethisinstance.- Parameters:
colorSchemeDisplayName- New display name for this color scheme.- Returns:
- This color scheme.
-
-