Class: Color
new Color(Number, Number, Number)
Parameters:
| Name |
Type |
Description |
Number |
|
r |
Number |
|
g |
Number |
|
b |
- Source:
Members
-
<static> this.b
-
Properties:
| Name |
Type |
Description |
Number |
|
b |
- Source:
-
<static> this.g
-
Properties:
| Name |
Type |
Description |
Number |
|
g |
- Source:
-
<static> this.r
-
Properties:
| Name |
Type |
Description |
Number |
|
r |
- Source:
Methods
-
<static> add(Color)
-
Parameters:
| Name |
Type |
Description |
Color |
|
other |
- Source:
Returns:
this
-
<static> cadd(Color, Color)
-
Parameters:
| Name |
Type |
Description |
Color |
|
a |
Color |
|
b |
- Source:
Returns:
this
-
<static> cdiv(Color, Color)
-
Parameters:
| Name |
Type |
Description |
Color |
|
a |
Color |
|
b |
- Source:
Returns:
this
-
<static> check()
-
- Source:
Returns:
this
-
<static> clerp(Color, Color, Number)
-
Parameters:
| Name |
Type |
Description |
Color |
|
a |
Color |
|
b |
Number |
|
x |
- Source:
Returns:
Color
-
<static> clone()
-
- Source:
Returns:
Color
-
<static> cmul(Color, Color)
-
Parameters:
| Name |
Type |
Description |
Color |
|
a |
Color |
|
b |
- Source:
Returns:
this
-
<static> copy(Color)
-
Parameters:
| Name |
Type |
Description |
Color |
|
other |
- Source:
Returns:
this
-
<static> csub(Color, Color)
-
Parameters:
| Name |
Type |
Description |
Color |
|
a |
Color |
|
b |
- Source:
Returns:
this
-
<static> div(Color)
-
Parameters:
| Name |
Type |
Description |
Color |
|
other |
- Source:
Returns:
this
-
<static> fromArray(Array)
-
Parameters:
| Name |
Type |
Description |
Array |
|
array |
- Source:
Returns:
this
-
<static> fromJSON(Object)
-
Parameters:
| Name |
Type |
Description |
Object |
|
json |
- Source:
Returns:
this
-
<static> fromVec2(Vec2)
-
Parameters:
| Name |
Type |
Description |
Vec2 |
|
v |
- Source:
Returns:
this
-
<static> fromVec3(Vec3)
-
Parameters:
| Name |
Type |
Description |
Vec3 |
|
v |
- Source:
Returns:
this
-
<static> fromVec4(Vec4)
-
Parameters:
| Name |
Type |
Description |
Vec4 |
|
v |
- Source:
Returns:
this
-
<static> length()
-
- Source:
Returns:
this
-
<static> lengthSq()
-
- Source:
Returns:
this
-
<static> lerp(Color, Number)
-
Parameters:
| Name |
Type |
Description |
Color |
|
other |
Number |
|
x |
- Source:
Returns:
Color
-
<static> max(Color)
-
Parameters:
| Name |
Type |
Description |
Color |
|
other |
- Source:
Returns:
Color
-
<static> min(Color)
-
Parameters:
| Name |
Type |
Description |
Color |
|
other |
- Source:
Returns:
Color
-
<static> mul(Color)
-
Parameters:
| Name |
Type |
Description |
Color |
|
other |
- Source:
Returns:
this
-
<static> normalize()
-
- Source:
Returns:
this
-
<static> sadd(Number)
-
Parameters:
| Name |
Type |
Description |
Number |
|
s |
- Source:
Returns:
this
-
<static> sdiv(Number)
-
Parameters:
| Name |
Type |
Description |
Number |
|
s |
- Source:
Returns:
this
-
<static> set(Number, Number, Number)
-
Parameters:
| Name |
Type |
Description |
Number |
|
r |
Number |
|
g |
Number |
|
b |
- Source:
Returns:
this
-
<static> setRGB(Number, Number, Number)
-
Parameters:
| Name |
Type |
Description |
Number |
|
r |
Number |
|
g |
Number |
|
b |
- Source:
Returns:
this
-
<static> setStyle(String)
-
Parameters:
| Name |
Type |
Description |
String |
|
style |
- Source:
Returns:
this
-
<static> smul(Number)
-
Parameters:
| Name |
Type |
Description |
Number |
|
s |
- Source:
Returns:
this
-
<static> ssub(Number)
-
Parameters:
| Name |
Type |
Description |
Number |
|
s |
- Source:
Returns:
this
-
<static> sub(Color)
-
Parameters:
| Name |
Type |
Description |
Color |
|
other |
- Source:
Returns:
this
-
<static> toArray()
-
- Source:
Returns:
Array
-
<static> toHEX()
-
- Source:
Returns:
Color
-
<static> toJSON()
-
- Source:
Returns:
Object
-
<static> toRGB()
-
- Source:
Returns:
Color
-
<static> toString()
-
- Source:
Returns:
String