Class ColorTypes.CIELAB64
java.lang.Object
dev.lukebemish.dynamicassetgenerator.api.colors.LongColorType
dev.lukebemish.dynamicassetgenerator.api.colors.ColorTypes.CIELAB64
- Enclosing class:
ColorTypes
Colors encoded with the least significant 64 bits representing 4 16-bit channels: alpha, and the "L", "a",
and "b" channels of a CIELAB encoding. Assumes standard illuminant D65. Coordinates are scaled by a factor of
255 before encoding, so the float version provided by
lightness(long), a(long), and b(long) should be
used for calculations.-
Nested Class Summary
Nested classes/interfaces inherited from class dev.lukebemish.dynamicassetgenerator.api.colors.LongColorType
LongColorType.BlendingLongColorType, LongColorType.HueLongColorType -
Method Summary
-
Method Details
-
lightness
@Contract(pure=true) public float lightness(long color) -
a
@Contract(pure=true) public float a(long color) -
b
@Contract(pure=true) public float b(long color) -
distance
public double distance(long color1, long color2) - Returns:
- the Euclidean distance between two colors in CIELAB32 format, ignoring alpha
-
toARGB64
public long toARGB64(long color) - Specified by:
toARGB64in classLongColorType- Returns:
- the color, encoded as
ColorTypes.ARGB64
-
fromARGB64
public long fromARGB64(long color) - Specified by:
fromARGB64in classLongColorType- Returns:
- the provided
ColorTypes.ARGB64color, encoded as this color type
-