Class TonalPalette.KeyColor
- java.lang.Object
-
- org.pushingpixels.ephemeral.chroma.palettes.TonalPalette.KeyColor
-
- Enclosing class:
- TonalPalette
private static final class TonalPalette.KeyColor extends java.lang.ObjectKey color is a color that represents the hue and chroma of a tonal palette.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.Integer,java.lang.Double>chromaCacheprivate doublehueprivate static doubleMAX_CHROMA_VALUEprivate doublerequestedChroma
-
Constructor Summary
Constructors Constructor Description KeyColor(double hue, double requestedChroma)Key color is a color that represents the hue and chroma of a tonal palette
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Hctcreate()Creates a key color from a [hue] and a [chroma].private doublemaxChroma(int tone)
-
-
-
Field Detail
-
hue
private final double hue
-
requestedChroma
private final double requestedChroma
-
chromaCache
private final java.util.Map<java.lang.Integer,java.lang.Double> chromaCache
-
MAX_CHROMA_VALUE
private static final double MAX_CHROMA_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
create
public Hct 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)
-
-