Class ShiftColorScheme
java.lang.Object
org.pushingpixels.radiance.theming.api.colorscheme.BaseColorScheme
org.pushingpixels.radiance.theming.internal.colorscheme.ShiftColorScheme
- All Implemented Interfaces:
RadianceColorScheme
,SchemeBaseColors
,SchemeDerivedColors
,RadianceTrait
- Direct Known Subclasses:
ShadeColorScheme
,TintColorScheme
,ToneColorScheme
Base class for shifted color schemes. A shifted color scheme is based on some
original color scheme, a shift color and a shift factor. All colors of the
original color scheme are shifted towards the shift color based on the shift
factor. The closer the shift factor value is to 1.0, the closer the colors of
the shifted color scheme will be to the shift color.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Color
Shift color for background colors.private double
Shift factor for background colors.private Color
The foreground color.private Color
Shift color for foreground color.private double
Shift factor for foreground colors.private Color
The main dark color.private Color
The main extra-light color.private Color
The main light color.private Color
The main medium color.private Color
The main ultra-dark color.private Color
The main ultra-light color.private RadianceColorScheme
The original color scheme.Fields inherited from class org.pushingpixels.radiance.theming.api.colorscheme.BaseColorScheme
displayName, isDark
-
Constructor Summary
ConstructorsConstructorDescriptionShiftColorScheme
(RadianceColorScheme origScheme, Color shiftColor, double shiftFactor) Creates a new shifted color scheme.ShiftColorScheme
(RadianceColorScheme origScheme, Color backgroundShiftColor, double backgroundShiftFactor, Color foregroundShiftColor, double foregroundShiftFactor, boolean shiftByBrightness) Creates a new shifted color scheme. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the dark color.Retrieves the extra color.Retrieves the foreground color.Retrieves the light color.Retrieves the medium color.Returns the original color scheme.double
Returns the shift factor.Retrieves the ultra-dark color.Retrieves the ultra-light color.Methods inherited from class org.pushingpixels.radiance.theming.api.colorscheme.BaseColorScheme
blendWith, getAccentedBackgroundFillColor, getBackgroundFillColor, getDisplayName, getEchoColor, getFocusRingColor, getLineColor, getMarkColor, getSelectionBackgroundColor, getSelectionForegroundColor, getSeparatorPrimaryColor, getSeparatorSecondaryColor, getTextBackgroundFillColor, hueShift, invert, isDark, named, negate, saturate, shade, shift, shiftBackground, tint, tone, 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 Details
-
backgroundShiftFactor
private double backgroundShiftFactorShift factor for background colors. -
foregroundShiftFactor
private double foregroundShiftFactorShift factor for foreground colors. -
backgroundShiftColor
Shift color for background colors. -
foregroundShiftColor
Shift color for foreground color. -
mainUltraLightColor
The main ultra-light color. -
mainExtraLightColor
The main extra-light color. -
mainLightColor
The main light color. -
mainMidColor
The main medium color. -
mainDarkColor
The main dark color. -
mainUltraDarkColor
The main ultra-dark color. -
foregroundColor
The foreground color. -
origScheme
The original color scheme.
-
-
Constructor Details
-
ShiftColorScheme
Creates a new shifted color scheme.- Parameters:
origScheme
- The original color scheme.shiftColor
- Shift color for the colors.shiftFactor
- Shift factor for the colors. Should be in 0.0-1.0 range.
-
ShiftColorScheme
public ShiftColorScheme(RadianceColorScheme origScheme, Color backgroundShiftColor, double backgroundShiftFactor, Color foregroundShiftColor, double foregroundShiftFactor, boolean shiftByBrightness) Creates a new shifted color scheme.- Parameters:
origScheme
- The original color scheme.backgroundShiftColor
- Shift color for the background colors.backgroundShiftFactor
- Shift factor for the background colors. Should be in 0.0-1.0 range.foregroundShiftColor
- Shift color for the foreground colors.foregroundShiftFactor
- Shift factor for the foreground colors. Should be in 0.0-1.0 range.shiftByBrightness
- Iftrue
, the shift will account for the brightness of the original color scheme colors.
-
-
Method Details
-
getForegroundColor
Description copied from interface:SchemeBaseColors
Retrieves the foreground color.- Returns:
- Foreground color.
-
getUltraLightColor
Description copied from interface:SchemeBaseColors
Retrieves the ultra-light color.- Returns:
- Ultra-light color.
-
getExtraLightColor
Description copied from interface:SchemeBaseColors
Retrieves the extra color.- Returns:
- Extra color.
-
getLightColor
Description copied from interface:SchemeBaseColors
Retrieves the light color.- Returns:
- Light color.
-
getMidColor
Description copied from interface:SchemeBaseColors
Retrieves the medium color.- Returns:
- Medium color.
-
getDarkColor
Description copied from interface:SchemeBaseColors
Retrieves the dark color.- Returns:
- Dark color.
-
getUltraDarkColor
Description copied from interface:SchemeBaseColors
Retrieves the ultra-dark color.- Returns:
- Ultra-dark color.
-
getOrigScheme
Returns the original color scheme.- Returns:
- The original color scheme.
-
getShiftFactor
public double getShiftFactor()Returns the shift factor.- Returns:
- Shift factor.
-