Class ColorTypes.ARGB32
java.lang.Object
dev.lukebemish.dynamicassetgenerator.api.colors.IntColorType
dev.lukebemish.dynamicassetgenerator.api.colors.IntColorType.BlendingIntColorType
dev.lukebemish.dynamicassetgenerator.api.colors.ColorTypes.ARGB32
- Enclosing class:
ColorTypes
Colors encoded with the least significant 32 bits representing 4 8-bit channels: alpha, red, green, and blue.
-
Nested Class Summary
Nested classes/interfaces inherited from class dev.lukebemish.dynamicassetgenerator.api.colors.IntColorType
IntColorType.BlendingIntColorType, IntColorType.HueIntColorType -
Method Summary
Methods inherited from class dev.lukebemish.dynamicassetgenerator.api.colors.IntColorType.BlendingIntColorType
alphaBlend
-
Method Details
-
red
@Contract(pure=true) public int red(int color) -
green
@Contract(pure=true) public int green(int color) -
blue
@Contract(pure=true) public int blue(int color) -
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
-
distance
public double distance(int color1, int color2) - Returns:
- the Euclidean distance between two colors in ARGB32 format, ignoring alpha
-