Class AlphaColor
java.lang.Object
net.minestom.server.color.Color
net.minestom.server.color.AlphaColor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<AlphaColor> static final NetworkBuffer.Type<AlphaColor> static final AlphaColorFields inherited from class Color
RGB_BYTE_NETWORK_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionAlphaColor(int argb) Creates an alpha color from an integer.AlphaColor(int alpha, int red, int green, int blue) AlphaColor(int alpha, RGBLike rgbLike) Creates a color from an RGB-like color. -
Method Summary
-
Field Details
-
NETWORK_TYPE
-
CODEC
-
WHITE
-
-
Constructor Details
-
AlphaColor
public AlphaColor(int alpha, int red, int green, int blue) -
AlphaColor
public AlphaColor(int argb) Creates an alpha color from an integer. This is done by reading each color component from the lowest order 32 bits of the integer, and creating a color from those components.- Parameters:
argb- the integer
-
AlphaColor
Creates a color from an RGB-like color.- Parameters:
rgbLike- the color
-
-
Method Details
-
withRed
-
withGreen
-
withBlue
-
withAlpha
-
asARGB
public int asARGB()Gets the color as an RGB integer.- Returns:
- An integer representation of this color, as 0xRRGGBB
-
alpha
-
equals
-
hashCode
-
toString
-