Class ColorTypes.HSL64

Enclosing class:
ColorTypes

public static final class ColorTypes.HSL64 extends LongColorType.HueLongColorType
Colors encoded with the least significant 64 bits representing 4 16-bit channels: alpha, hue, saturation, and lightness.
  • Method Details

    • saturation

      @Contract(pure=true) public int saturation(long color)
    • lightness

      @Contract(pure=true) public int lightness(long color)
    • makeChroma

      protected float makeChroma(long color)
      Specified by:
      makeChroma in class LongColorType.HueLongColorType
      Returns:
      the chroma from 0 to 1 given a color
    • makeMatch

      protected float makeMatch(long color, float chroma)
      Specified by:
      makeMatch in class LongColorType.HueLongColorType
      Returns:
      what needs to be added to each 0 to 1 channel to provide the proper value, given a full color and chroma
    • makeColor

      protected long makeColor(int alpha, int hue, float chroma, float xMin, float xMax)
      Description copied from class: LongColorType.HueLongColorType
      Finalized encoding of a color given some parameters.
      Specified by:
      makeColor in class LongColorType.HueLongColorType
      Parameters:
      alpha - alpha value, from 0x0000 to 0xFFFF
      hue - hue, from 0x0000 to 0xFFFF
      chroma - chroma, from 0 to 1
      xMin - minimum value of RGB channels, from 0 to 1
      xMax - maximum value of RGB channels, from 0 to 1
      Returns:
      an encoded color