image
Class ColorDatabase

Available colors are listed in the following table. If an undefined color is used then a RuntimeException
is thrown. Custom colors can be created using the static makeColor methods.

Alternatively clients can specify a 7 character string beginning with a '#' (hash-mark)
followed by a 6 digit hexadecimal number that encodes the requested RGB color
(Red, Green, Blue), e.g., "#FF0000" for Red, or
"#00FF00" for Green.
For advanced users, a 9 character string beginning with a '#' followed by an 8 digit
hexadecimal number that encodes the requested ARGB color (Alpha, Red, Green, Blue), e.g.,
"#FFFF0000" for Opaque Red, or "#8800FF00"
for Half-Transparent Green.

colorToARGB

Convert the given Alpha and Color intensities into ARGB integer
format. ARGB intensities must be between 0 and 255, inclusive.

makeColor

public static java.lang.String makeColor(int color)

Create a color String from the given integer that encodes Alpha/Red/Green/Blue
intensities. Each of the low-order bytes encodes an intensity
in [0..255] where the Red/Green/Blue/Alpha are in order from high to low
order bytes.

makeAwtColor

public static java.awt.Color makeAwtColor(int color)

Create a Color from the given integer that encodes Alpha/Red/Green/Blue
intensities. Each of the low-order bytes encodes an intensity
in [0..255] where the Alpha/Red/Green/Blue/Alpha are in order from high to low
order bytes.