Class TonalPalette.KeyColor

java.lang.Object
org.pushingpixels.ephemeral.chroma.palettes.TonalPalette.KeyColor
Enclosing class:
TonalPalette

private static final class TonalPalette.KeyColor extends Object
Key color is a color that represents the hue and chroma of a tonal palette.
  • Field Details

    • hue

      private final double hue
    • requestedChroma

      private final double requestedChroma
    • chromaCache

      private final Map<Integer,Double> 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

      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)