Enum Class ColorStyle
- All Implemented Interfaces:
Serializable,Comparable<ColorStyle>,Constable
The algorithm used to construct a ColorScheme in ColorScheme.fromSeed(javafx.scene.paint.Color).
The TONAL_SPOT style builds default Material scheme colors. These colors are
mapped to light or dark tones to achieve visually accessible color
pairings with sufficient contrast between foreground and background elements.
In some cases, the tones can prevent colors from appearing as intended,
such as when a color is too light to offer enough contrast for accessibility.
Color fidelity (ColorStyle.FIDELITY) is a feature that adjusts
tones in these cases to produce the intended visual results without harming
visual contrast.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAlmost identical tofidelity.Pastel colors, medium chroma palettes.The resulting color palettes match seed color, even if the seed color is very bright (high chroma).A playful theme - the seed color's hue does not appear in the theme.All colors are grayscale, no chroma.Close to grayscale, a hint of chroma.A playful theme - the seed color's hue does not appear in the theme.Default for Material theme colors.Pastel colors, high chroma palettes. -
Method Summary
Modifier and TypeMethodDescriptiontoString()static ColorStyleReturns the enum constant of this class with the specified name.static ColorStyle[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TONAL_SPOT
Default for Material theme colors. Builds pastel palettes with a low chroma. -
FIDELITY
The resulting color palettes match seed color, even if the seed color is very bright (high chroma). -
MONOCHROME
All colors are grayscale, no chroma. -
NEUTRAL
Close to grayscale, a hint of chroma. -
VIBRANT
Pastel colors, high chroma palettes. The primary palette's chroma is at maximum. Usefidelityinstead if tokens should alter their tone to match the palette vibrancy. -
EXPRESSIVE
Pastel colors, medium chroma palettes. The primary palette's hue is different from the seed color, for variety. -
CONTENT
Almost identical tofidelity. Tokens and palettes match the seed color.ColorScheme.getPrimaryContainer()is the seed color, adjusted to ensure contrast with surfaces. The tertiary palette is analogue of the seed color. -
RAINBOW
A playful theme - the seed color's hue does not appear in the theme. -
FRUIT_SALAD
A playful theme - the seed color's hue does not appear in the theme.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
toString
- Overrides:
toStringin classEnum<ColorStyle>
-