Color

new Color(int r, int g, int b)

Constructs a new Color object with the specified red (r), green (g), and blue (b) values. Alpha (transparency) is not allowed in this constructor.

new Color(int r, int g, int b, int a)

Constructs a new Color object with the specified red (r), green (g), blue (b), and alpha (a) values. Alpha represents the transparency of the color.

getRed(): int

Returns the red component of this color.

getGreen(): int

Returns the green component of this color.

getBlue(): int

Returns the blue component of this color.

getAlpha(): int

Returns the alpha (transparency) component of this color.

getRGB(): int

Returns the RGB value representing the color. This includes the alpha (transparency) component if it was set.

Last updated