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.Object
Key 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>
chromaCache
private double
hue
private static double
MAX_CHROMA_VALUE
private double
requestedChroma
-
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 Hct
create()
Creates a key color from a [hue] and a [chroma].private double
maxChroma(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)
-
-