Class ColorTypes.CIELAB32

java.lang.Object
dev.lukebemish.dynamicassetgenerator.api.colors.IntColorType
dev.lukebemish.dynamicassetgenerator.api.colors.ColorTypes.CIELAB32
Enclosing class:
ColorTypes

public static final class ColorTypes.CIELAB32 extends IntColorType
Colors encoded with the least significant 32 bits representing 4 8-bit channels: alpha, and the "L", "a", and "b" channels of a CIELAB encoding. Assumes standard illuminant D65.
  • Method Details

    • lightness

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

      @Contract(pure=true) public int a(int color)
    • b

      @Contract(pure=true) public int b(int color)
    • distance

      public double distance(int color1, int color2)
      Returns:
      the Euclidean distance between two colors in CIELAB32 format, ignoring alpha
    • toARGB32

      public int toARGB32(int color)
      Specified by:
      toARGB32 in class IntColorType
      Returns:
      the color, encoded as ColorTypes.ARGB32
    • fromARGB32

      public int fromARGB32(int color)
      Specified by:
      fromARGB32 in class IntColorType
      Returns:
      the provided ColorTypes.ARGB32 color, encoded as this color type