Gets or sets the alpha component of this Color, in a range from 0 to 1 (zero is transparent, one is solid).
Gets or sets the blue component of this Color, in a range from 0 to 255.
Gets or sets the green component of this Color, in a range from 0 to 255.
Gets or sets the red component of this Color, in a range from 0 to 255.
Gets an array with this color's HSB components.
Gets an array with this color's HSL components.
Gets a string representation of this Color.
Creates a new Color using the specified RGBA color channel values.
Value for the red channel, from 0 to 255.
Value for the green channel, from 0 to 255.
Value for the blue channel, from 0 to 255.
Value for the alpha channel, from 0 to 1.
Represents a color.
The Color class parses colors specified as CSS strings and exposes their red, green, blue, and alpha channels as read-write properties.
The Color class also provides fromHsb and fromHsl methods for creating colors using the HSB and HSL color models instead of RGB, as well as getHsb and getHsl methods for retrieving the color components using those color models.
Finally, the Color class provides an interpolate method that creates colors by interpolating between two colors using the HSL model. This method is especially useful for creating color animations with the animate method.
The example below shows how this works:
Example