Class TonalPalette.KeyColor
java.lang.Object
org.pushingpixels.ephemeral.chroma.palettes.TonalPalette.KeyColor
- Enclosing class:
TonalPalette
Key color is a color that represents the hue and chroma of a tonal palette.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final doubleprivate static final doubleprivate final double -
Constructor Summary
ConstructorsConstructorDescriptionKeyColor(double hue, double requestedChroma) Key color is a color that represents the hue and chroma of a tonal palette -
Method Summary
-
Field Details
-
hue
private final double hue -
requestedChroma
private final double requestedChroma -
chromaCache
-
MAX_CHROMA_VALUE
private static final double MAX_CHROMA_VALUE- See Also:
-
-
Constructor Details
-
KeyColor
public KeyColor(double hue, double requestedChroma) Key color is a color that represents the hue and chroma of a tonal palette
-
-
Method Details
-
create
Creates a key color from a [hue] and a [chroma]. The key color is the first tone, starting from T50, matching the given hue and chroma.- Returns:
- Key color [Hct]
-
maxChroma
private double maxChroma(int tone)
-