Class IntColorType
java.lang.Object
dev.lukebemish.dynamicassetgenerator.api.colors.IntColorType
- Direct Known Subclasses:
ColorTypes.CIELAB32,IntColorType.BlendingIntColorType,IntColorType.HueIntColorType
A type of color that has 4 8-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(int color) final intcolor(int alpha, int first, int second, int third) Constructs a new color from channel values between 0 and 255.protected final intfirst(int color) abstract intfromARGB32(int color) protected final intsecond(int color) protected final intthird(int color) abstract inttoARGB32(int color)
-
Constructor Details
-
IntColorType
public IntColorType()
-
-
Method Details
-
alpha
@Contract(pure=true) public final int alpha(int color) -
first
@Contract(pure=true) protected final int first(int color) -
second
@Contract(pure=true) protected final int second(int color) -
third
@Contract(pure=true) protected final int third(int color) -
toARGB32
@Contract(pure=true) public abstract int toARGB32(int color) - Returns:
- the color, encoded as
ColorTypes.ARGB32
-
fromARGB32
@Contract(pure=true) public abstract int fromARGB32(int color) - Returns:
- the provided
ColorTypes.ARGB32color, encoded as this color type
-
color
@Contract(pure=true) public final int color(int alpha, int first, int second, int third) Constructs a new color from channel values between 0 and 255.- Parameters:
alpha- the alpha channel, between 0 and 255first- the first channel, between 0 and 255second- the second channel, between 0 and 255third- the third channel, between 0 and 255- Returns:
- a new color, from the provided channels
-