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 r
number The red color between 0 and 255 g
number The green color between 0 and 255 b
number The blue color between 0 and 255 a
number The alpha value between 0 and 255 Returns:
Type Description SystemColor -
Used for mixing vectors according to alpha in getHex algorithm
Name Type Description x
THREE.Vector3 The x position y
THREE.Vector3 The y position aThe
number alpha value between 0 and 1 Returns:
Type Description THREE.Vector3 -
Initialize the color according to RGBA values
Name Type Default Description r
number The red color between 0 and 255 g
number The green color between 0 and 255 b
number The blue color between 0 and 255 a
number 255 The alpha value between 0 and 255 -
Read the JSON associated to the color
Name Type Description json
Object Json object describing the color -
Get the hex value of the color
Name Type Description tone
THREE.Vector4 The tone value Returns:
Type Description string