Create a Color using a string or object as described above.
Name | Type | Description |
---|---|---|
color |
String | Object |
A color string or object. |
Members
-
hsvObject
-
Get or set the color using a HSV object.
-
opacityNumber
-
Get or set the opacity (alpha) of the color.
-
rgbObject
-
Get or set the color using a RGB object.
-
rgbaObject
-
Get or set the color using a RGBA object.
-
rgbaStringString
-
Return the color as an RGBA string.
-
rgbStringString
-
Return the color as an RGB string.
Methods
-
Return a object of color names and their HEX values
-
Returns a copy of this color object
-
Returns true if this color has the same value as the provided color
Name Type Default Description color
Color This color to compare with
ignoreAlpha
Boolean false Should opacity be considered in the comparison
-
Inverts the color
-
Set the color using a color string (e.g RGB, RGBA, Hex, HLA) or a color object (e.g. RGB, RGBA, HSV) as described above.
Name Type Description color
String | Object A color string or object
-
Return the class name as a string.
Returns:
Type Description String - 'Color'