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.Color
foregroundColor
The foreground color.private java.awt.Color
mainDarkColor
The main dark color.private java.awt.Color
mainExtraLightColor
The main extra-light color.private java.awt.Color
mainLightColor
The main light color.private java.awt.Color
mainMidColor
The main medium color.private java.awt.Color
mainUltraDarkColor
The main ultra-dark color.private java.awt.Color
mainUltraLightColor
The main ultra-light color.private RadianceColorScheme[]
origSchemes
The 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 RadianceColorScheme
blendWith(RadianceColorScheme otherScheme, double likenessToThisScheme)
Creates a blended version ofthis
color scheme based on another color scheme.java.awt.Color
getDarkColor()
Retrieves the dark color.java.awt.Color
getExtraLightColor()
Retrieves the extra color.java.awt.Color
getForegroundColor()
Retrieves the foreground color.java.awt.Color
getLightColor()
Retrieves the light color.java.awt.Color
getMidColor()
Retrieves the medium color.RadianceColorScheme[]
getOrigSchemes()
Returns the original color schemes ofthis
mixed color scheme.java.awt.Color
getUltraDarkColor()
Retrieves the ultra-dark color.java.awt.Color
getUltraLightColor()
Retrieves the ultra-light color.RadianceColorScheme
hueShift(double hueShiftFactor)
Creates a hue-shifted (in HSB space) version ofthis
color scheme.RadianceColorScheme
invert()
Creates an inverted version ofthis
scheme.RadianceColorScheme
negate()
Creates a negated version ofthis
scheme.RadianceColorScheme
saturate(double saturateFactor)
Creates a saturated or desaturated version ofthis
scheme.RadianceColorScheme
shade(double shadeFactor)
Creates a shaded (shifted towards black) version ofthis
color scheme.RadianceColorScheme
tint(double tintFactor)
Creates a tinted (shifted towards white) version ofthis
color scheme.RadianceColorScheme
tone(double toneFactor)
Creates a toned (shifted towards gray) version ofthis
color 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:SchemeBaseColors
Retrieves the foreground color.- Returns:
- Foreground color.
-
getUltraLightColor
public java.awt.Color getUltraLightColor()
Description copied from interface:SchemeBaseColors
Retrieves the ultra-light color.- Returns:
- Ultra-light color.
-
getExtraLightColor
public java.awt.Color getExtraLightColor()
Description copied from interface:SchemeBaseColors
Retrieves the extra color.- Returns:
- Extra color.
-
getLightColor
public java.awt.Color getLightColor()
Description copied from interface:SchemeBaseColors
Retrieves the light color.- Returns:
- Light color.
-
getMidColor
public java.awt.Color getMidColor()
Description copied from interface:SchemeBaseColors
Retrieves the medium color.- Returns:
- Medium color.
-
getDarkColor
public java.awt.Color getDarkColor()
Description copied from interface:SchemeBaseColors
Retrieves the dark color.- Returns:
- Dark color.
-
getUltraDarkColor
public java.awt.Color getUltraDarkColor()
Description copied from interface:SchemeBaseColors
Retrieves the ultra-dark color.- Returns:
- Ultra-dark color.
-
getOrigSchemes
public RadianceColorScheme[] getOrigSchemes()
Returns the original color schemes ofthis
mixed color scheme.- Returns:
- The original color schemes of
this
mixed color scheme.
-
tint
public RadianceColorScheme tint(double tintFactor)
Description copied from interface:RadianceColorScheme
Creates a tinted (shifted towards white) version ofthis
color scheme.- Specified by:
tint
in interfaceRadianceColorScheme
- Overrides:
tint
in classBaseColorScheme
- Parameters:
tintFactor
- Value in 0.0...1.0 range. Larger values shift more towards white color.- Returns:
- Tinted version of
this
scheme.
-
tone
public RadianceColorScheme tone(double toneFactor)
Description copied from interface:RadianceColorScheme
Creates a toned (shifted towards gray) version ofthis
color scheme.- Specified by:
tone
in interfaceRadianceColorScheme
- Overrides:
tone
in classBaseColorScheme
- Parameters:
toneFactor
- Value in 0.0...1.0 range. Larger values shift more towards gray color.- Returns:
- Toned version of
this
scheme.
-
shade
public RadianceColorScheme shade(double shadeFactor)
Description copied from interface:RadianceColorScheme
Creates a shaded (shifted towards black) version ofthis
color scheme.- Specified by:
shade
in interfaceRadianceColorScheme
- Overrides:
shade
in classBaseColorScheme
- Parameters:
shadeFactor
- Value in 0.0...1.0 range. Larger values shift more towards black color.- Returns:
- Shaded version of
this
scheme.
-
saturate
public RadianceColorScheme saturate(double saturateFactor)
Description copied from interface:RadianceColorScheme
Creates a saturated or desaturated version ofthis
scheme. The value and brightness stay the same.- Specified by:
saturate
in interfaceRadianceColorScheme
- Overrides:
saturate
in 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
this
scheme.
-
hueShift
public RadianceColorScheme hueShift(double hueShiftFactor)
Description copied from interface:RadianceColorScheme
Creates a hue-shifted (in HSB space) version ofthis
color scheme.- Specified by:
hueShift
in interfaceRadianceColorScheme
- Overrides:
hueShift
in classBaseColorScheme
- Parameters:
hueShiftFactor
- Value in -1.0...1.0 range.- Returns:
- Hue-shifted version of
this
scheme.
-
invert
public RadianceColorScheme invert()
Description copied from interface:RadianceColorScheme
Creates an inverted version ofthis
scheme.- Specified by:
invert
in interfaceRadianceColorScheme
- Overrides:
invert
in classBaseColorScheme
- Returns:
- Inverted version of
this
scheme.
-
negate
public RadianceColorScheme negate()
Description copied from interface:RadianceColorScheme
Creates a negated version ofthis
scheme.- Specified by:
negate
in interfaceRadianceColorScheme
- Overrides:
negate
in classBaseColorScheme
- Returns:
- Negated version of
this
scheme.
-
blendWith
public RadianceColorScheme blendWith(RadianceColorScheme otherScheme, double likenessToThisScheme)
Description copied from interface:RadianceColorScheme
Creates a blended version ofthis
color scheme based on another color scheme.- Specified by:
blendWith
in interfaceRadianceColorScheme
- Overrides:
blendWith
in 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.
-
-