Class ColorTypes.CIELAB32
java.lang.Object
dev.lukebemish.dynamicassetgenerator.api.colors.IntColorType
dev.lukebemish.dynamicassetgenerator.api.colors.ColorTypes.CIELAB32
- Enclosing class:
ColorTypes
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class dev.lukebemish.dynamicassetgenerator.api.colors.IntColorType
IntColorType.BlendingIntColorType, IntColorType.HueIntColorType -
Method Summary
-
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:
toARGB32in classIntColorType- Returns:
- the color, encoded as
ColorTypes.ARGB32
-
fromARGB32
public int fromARGB32(int color) - Specified by:
fromARGB32in classIntColorType- Returns:
- the provided
ColorTypes.ARGB32color, encoded as this color type
-