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