| Name | Type | Description |
|---|---|---|
json |
Object | optional Json object describing the color |
Properties:
| Name | Type | Description |
|---|---|---|
red |
number | The red color between 0 and 255 |
green |
number | The green color between 0 and 255 |
blue |
number | The blue color between 0 and 255 |
alpha |
number | The alpha value between 0 and 1 |
rgb |
string | The rgb value used for ctx |
color |
THREE.Color | The three.js color |
Methods
-
SystemColor.createColor (r, g, b, a)SystemColor static
-
Create a new color according to RGBA values
Name Type Description rnumber The red color between 0 and 255 gnumber The green color between 0 and 255 bnumber The blue color between 0 and 255 anumber The alpha value between 0 and 255 Returns:
Type Description SystemColor -
Used for mixing vectors according to alpha in getHex algorithm
Name Type Description xTHREE.Vector3 The x position yTHREE.Vector3 The y position aThenumber alpha value between 0 and 1 Returns:
Type Description THREE.Vector3 -
Initialize the color according to RGBA values
Name Type Default Description rnumber The red color between 0 and 255 gnumber The green color between 0 and 255 bnumber The blue color between 0 and 255 anumber 255 The alpha value between 0 and 255 -
Read the JSON associated to the color
Name Type Description jsonObject Json object describing the color -
Get the hex value of the color
Name Type Description toneTHREE.Vector4 The tone value Returns:
Type Description string