Constructor
new Color(r, g, b, aopt)
Constructor
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
r |
number | Red color in the range [0-255] | ||
g |
number | Green color in the range [0-255] | ||
b |
number | Blue color in the range [0-255] | ||
a |
number |
<optional> |
1 | Opacity in the range [0-255] |
Members
Methods
isEqual(color) → {boolean}
Check if the given Color instance is equal to this one
Parameters:
Name | Type | Description |
---|---|---|
color |
Color | A Color instance |
True if the two colors are equals, otherwise false
boolean
set(r, g, b, aopt)
Set color
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
r |
number | Red color in the range [0-255] | ||
g |
number | Green color in the range [0-255] | ||
b |
number | Blue color in the range [0-255] | ||
a |
number |
<optional> |
1 | Opacity in the range [0-255] |