Class Color
Represents an RGB(A) color.
Defined in: benchgl.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Color(r, g, b, a)
Creates a new Color.
|
Method Attributes | Method Name and Description |
---|---|
Gets an array representaton of this Color in RGBA format.
|
|
Gets an array representaton of this Color in RGB format.
|
Class Detail
Color(r, g, b, a)
Creates a new Color.
- Parameters:
- {Number} r
- The red component of the color.
- {Number} g
- The green component of the color.
- {Number} b
- The blue component of the color.
- {Number} a Optional, Default: 1
- The alpha component of the color.
Method Detail
{Number[]}
toRGBAArray()
Gets an array representaton of this Color in RGBA format.
- Returns:
- {Number[]} An array representing an RGBA color.
{Number[]}
toRGBArray()
Gets an array representaton of this Color in RGB format.
- Returns:
- {Number[]} An array representing an RGB color.