Class MixColorScheme
- java.lang.Object
-
- org.pushingpixels.radiance.theming.api.colorscheme.BaseColorScheme
-
- org.pushingpixels.radiance.theming.extras.api.colorschemepack.MixColorScheme
-
- All Implemented Interfaces:
RadianceColorScheme,SchemeBaseColors,SchemeDerivedColors,RadianceTrait
public class MixColorScheme extends BaseColorScheme
Mixed color scheme.
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.ColorforegroundColorThe foreground color.private java.awt.ColormainDarkColorThe main dark color.private java.awt.ColormainExtraLightColorThe main extra-light color.private java.awt.ColormainLightColorThe main light color.private java.awt.ColormainMidColorThe main medium color.private java.awt.ColormainUltraDarkColorThe main ultra-dark color.private java.awt.ColormainUltraLightColorThe main ultra-light color.private RadianceColorScheme[]origSchemesThe original color schemes.-
Fields inherited from class org.pushingpixels.radiance.theming.api.colorscheme.BaseColorScheme
displayName, isDark
-
-
Constructor Summary
Constructors Constructor Description MixColorScheme(java.lang.String displayName, RadianceColorScheme... origSchemes)Creates a new mixed color scheme.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RadianceColorSchemeblendWith(RadianceColorScheme otherScheme, double likenessToThisScheme)Creates a blended version ofthiscolor scheme based on another color scheme.java.awt.ColorgetDarkColor()Retrieves the dark color.java.awt.ColorgetExtraLightColor()Retrieves the extra color.java.awt.ColorgetForegroundColor()Retrieves the foreground color.java.awt.ColorgetLightColor()Retrieves the light color.java.awt.ColorgetMidColor()Retrieves the medium color.RadianceColorScheme[]getOrigSchemes()Returns the original color schemes ofthismixed color scheme.java.awt.ColorgetUltraDarkColor()Retrieves the ultra-dark color.java.awt.ColorgetUltraLightColor()Retrieves the ultra-light color.RadianceColorSchemehueShift(double hueShiftFactor)Creates a hue-shifted (in HSB space) version ofthiscolor scheme.RadianceColorSchemeinvert()Creates an inverted version ofthisscheme.RadianceColorSchemenegate()Creates a negated version ofthisscheme.RadianceColorSchemesaturate(double saturateFactor)Creates a saturated or desaturated version ofthisscheme.RadianceColorSchemeshade(double shadeFactor)Creates a shaded (shifted towards black) version ofthiscolor scheme.RadianceColorSchemetint(double tintFactor)Creates a tinted (shifted towards white) version ofthiscolor scheme.RadianceColorSchemetone(double toneFactor)Creates a toned (shifted towards gray) version ofthiscolor scheme.-
Methods inherited from class org.pushingpixels.radiance.theming.api.colorscheme.BaseColorScheme
getAccentedBackgroundFillColor, getBackgroundFillColor, getDisplayName, getEchoColor, getFocusRingColor, getLineColor, getMarkColor, getSelectionBackgroundColor, getSelectionForegroundColor, getSeparatorPrimaryColor, getSeparatorSecondaryColor, getTextBackgroundFillColor, isDark, named, shift, shiftBackground, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.pushingpixels.radiance.theming.api.colorscheme.RadianceColorScheme
getColorFilter
-
Methods inherited from interface org.pushingpixels.radiance.theming.api.colorscheme.SchemeBaseColors
toImage
-
-
-
-
Field Detail
-
mainUltraLightColor
private java.awt.Color mainUltraLightColor
The main ultra-light color.
-
mainExtraLightColor
private java.awt.Color mainExtraLightColor
The main extra-light color.
-
mainLightColor
private java.awt.Color mainLightColor
The main light color.
-
mainMidColor
private java.awt.Color mainMidColor
The main medium color.
-
mainDarkColor
private java.awt.Color mainDarkColor
The main dark color.
-
mainUltraDarkColor
private java.awt.Color mainUltraDarkColor
The main ultra-dark color.
-
foregroundColor
private java.awt.Color foregroundColor
The foreground color.
-
origSchemes
private RadianceColorScheme[] origSchemes
The original color schemes.
-
-
Constructor Detail
-
MixColorScheme
public MixColorScheme(java.lang.String displayName, RadianceColorScheme... origSchemes)Creates a new mixed color scheme.- Parameters:
displayName- Display name for the new color scheme.origSchemes- The original color schemes.
-
-
Method Detail
-
getForegroundColor
public java.awt.Color getForegroundColor()
Description copied from interface:SchemeBaseColorsRetrieves the foreground color.- Returns:
- Foreground color.
-
getUltraLightColor
public java.awt.Color getUltraLightColor()
Description copied from interface:SchemeBaseColorsRetrieves the ultra-light color.- Returns:
- Ultra-light color.
-
getExtraLightColor
public java.awt.Color getExtraLightColor()
Description copied from interface:SchemeBaseColorsRetrieves the extra color.- Returns:
- Extra color.
-
getLightColor
public java.awt.Color getLightColor()
Description copied from interface:SchemeBaseColorsRetrieves the light color.- Returns:
- Light color.
-
getMidColor
public java.awt.Color getMidColor()
Description copied from interface:SchemeBaseColorsRetrieves the medium color.- Returns:
- Medium color.
-
getDarkColor
public java.awt.Color getDarkColor()
Description copied from interface:SchemeBaseColorsRetrieves the dark color.- Returns:
- Dark color.
-
getUltraDarkColor
public java.awt.Color getUltraDarkColor()
Description copied from interface:SchemeBaseColorsRetrieves the ultra-dark color.- Returns:
- Ultra-dark color.
-
getOrigSchemes
public RadianceColorScheme[] getOrigSchemes()
Returns the original color schemes ofthismixed color scheme.- Returns:
- The original color schemes of
thismixed color scheme.
-
tint
public RadianceColorScheme tint(double tintFactor)
Description copied from interface:RadianceColorSchemeCreates a tinted (shifted towards white) version ofthiscolor scheme.- Specified by:
tintin interfaceRadianceColorScheme- Overrides:
tintin classBaseColorScheme- Parameters:
tintFactor- Value in 0.0...1.0 range. Larger values shift more towards white color.- Returns:
- Tinted version of
thisscheme.
-
tone
public RadianceColorScheme tone(double toneFactor)
Description copied from interface:RadianceColorSchemeCreates a toned (shifted towards gray) version ofthiscolor scheme.- Specified by:
tonein interfaceRadianceColorScheme- Overrides:
tonein classBaseColorScheme- Parameters:
toneFactor- Value in 0.0...1.0 range. Larger values shift more towards gray color.- Returns:
- Toned version of
thisscheme.
-
shade
public RadianceColorScheme shade(double shadeFactor)
Description copied from interface:RadianceColorSchemeCreates a shaded (shifted towards black) version ofthiscolor scheme.- Specified by:
shadein interfaceRadianceColorScheme- Overrides:
shadein classBaseColorScheme- Parameters:
shadeFactor- Value in 0.0...1.0 range. Larger values shift more towards black color.- Returns:
- Shaded version of
thisscheme.
-
saturate
public RadianceColorScheme saturate(double saturateFactor)
Description copied from interface:RadianceColorSchemeCreates a saturated or desaturated version ofthisscheme. The value and brightness stay the same.- Specified by:
saturatein interfaceRadianceColorScheme- Overrides:
saturatein classBaseColorScheme- 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.
-
hueShift
public RadianceColorScheme hueShift(double hueShiftFactor)
Description copied from interface:RadianceColorSchemeCreates a hue-shifted (in HSB space) version ofthiscolor scheme.- Specified by:
hueShiftin interfaceRadianceColorScheme- Overrides:
hueShiftin classBaseColorScheme- Parameters:
hueShiftFactor- Value in -1.0...1.0 range.- Returns:
- Hue-shifted version of
thisscheme.
-
invert
public RadianceColorScheme invert()
Description copied from interface:RadianceColorSchemeCreates an inverted version ofthisscheme.- Specified by:
invertin interfaceRadianceColorScheme- Overrides:
invertin classBaseColorScheme- Returns:
- Inverted version of
thisscheme.
-
negate
public RadianceColorScheme negate()
Description copied from interface:RadianceColorSchemeCreates a negated version ofthisscheme.- Specified by:
negatein interfaceRadianceColorScheme- Overrides:
negatein classBaseColorScheme- Returns:
- Negated version of
thisscheme.
-
blendWith
public RadianceColorScheme blendWith(RadianceColorScheme otherScheme, double likenessToThisScheme)
Description copied from interface:RadianceColorSchemeCreates a blended version ofthiscolor scheme based on another color scheme.- Specified by:
blendWithin interfaceRadianceColorScheme- Overrides:
blendWithin classBaseColorScheme- 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.
-
-