Class ColorBlindTonalPalette

java.lang.Object
org.pushingpixels.ephemeral.chroma.palettes.ColorBlindTonalPalette
All Implemented Interfaces:
BaseTonalPalette

public final class ColorBlindTonalPalette extends Object implements BaseTonalPalette
A convenience class for wrapping a tonal palette in one of the supported color blindness modes.

ColorBlindTonalPalette is intended for use in a single thread due to its stateful caching.

  • Method Details

    • from

      public static ColorBlindTonalPalette from(BaseTonalPalette palette, ColorBlindnessKind colorBlindnessKind)
    • tone

      public int tone(int tone)
      Description copied from interface: BaseTonalPalette
      Create an ARGB color from this palette and the provided HCT tone.
      Specified by:
      tone in interface BaseTonalPalette
      Parameters:
      tone - HCT tone, measured from 0 to 100.
      Returns:
      ARGB representation of a color with that tone.
    • getHct

      public Hct getHct(double tone)
      Given a tone, use hue and chroma of palette to create a color, and return it as HCT.
      Specified by:
      getHct in interface BaseTonalPalette