Class Colors
java.lang.Object
com.botwithus.bot.api.draw.Colors
Packed
0xAARRGGBB colours for debug drawing, and the two helpers for
building one.
Every named constant is fully opaque. Blend by passing an explicit alpha
through withAlpha(int, int) or argb(int, int, int, int) —
a colour with a zero alpha draws nothing, which looks exactly like a broken
overlay.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intThe producer's own default when a command omitscolor.static final intstatic final intstatic final intFully opaque alpha, as it appears in the top byte of an ARGB value.static final intstatic final intstatic final intstatic final int -
Method Summary
-
Field Details
-
OPAQUE
public static final int OPAQUEFully opaque alpha, as it appears in the top byte of an ARGB value.- See Also:
-
GREEN
public static final int GREENThe producer's own default when a command omitscolor.- See Also:
-
RED
public static final int RED- See Also:
-
BLUE
public static final int BLUE- See Also:
-
CYAN
public static final int CYAN- See Also:
-
MAGENTA
public static final int MAGENTA- See Also:
-
YELLOW
public static final int YELLOW- See Also:
-
ORANGE
public static final int ORANGE- See Also:
-
WHITE
public static final int WHITE- See Also:
-
BLACK
public static final int BLACK- See Also:
-
GREY
public static final int GREY- See Also:
-
-
Method Details
-
argb
public static int argb(int alpha, int red, int green, int blue) Pack four 0..255 channels. Values outside that range are masked rather than rejected, so an arithmetic overflow in a caller's colour ramp cannot bleed into a neighbouring channel. -
withAlpha
public static int withAlpha(int argb, int alpha) The same colour at a different 0..255 alpha. -
alphaOf
public static int alphaOf(int argb) The 0..255 alpha channel of a packed colour.
-