Class LongColorType
java.lang.Object
dev.lukebemish.dynamicassetgenerator.api.colors.LongColorType
- Direct Known Subclasses:
ColorTypes.CIELAB64,LongColorType.BlendingLongColorType,LongColorType.HueLongColorType
A type of color that has 4 16-bit channels, the first of which encodes the alpha value.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA color type whose channels can be linearly blended by alpha blending.static classA color type that encodes hue and chroma-related values. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal intalpha(long color) longcolor(int alpha, int first, int second, int third) Constructs a new color from channel values between 0x0000 and 0xFFFF.protected final intfirst(long color) abstract longfromARGB64(long color) protected final intsecond(long color) protected final intthird(long color) abstract longtoARGB64(long color)
-
Constructor Details
-
LongColorType
public LongColorType()
-
-
Method Details
-
alpha
@Contract(pure=true) public final int alpha(long color) -
first
@Contract(pure=true) protected final int first(long color) -
second
@Contract(pure=true) protected final int second(long color) -
third
@Contract(pure=true) protected final int third(long color) -
toARGB64
@Contract(pure=true) public abstract long toARGB64(long color) - Returns:
- the color, encoded as
ColorTypes.ARGB64
-
fromARGB64
@Contract(pure=true) public abstract long fromARGB64(long color) - Returns:
- the provided
ColorTypes.ARGB64color, encoded as this color type
-
color
@Contract(pure=true) public long color(int alpha, int first, int second, int third) Constructs a new color from channel values between 0x0000 and 0xFFFF.- Parameters:
alpha- the alpha channel, between 0x0000 and 0xFFFFfirst- the first channel, between 0x0000 and 0xFFFFsecond- the second channel, between 0x0000 and 0xFFFFthird- the third channel, between 0x0000 and 0xFFFF- Returns:
- a new color, from the provided channels
-