Set color components.
Set all components.
Clone this color.
Copy components into array
in ARGB order.
Typed array
Optional, offset into array
Optional, if true
copy in range [0,1], otherwise copy in range [0,255] (default)
Self
Copy components into array
in RGB order.
Typed array
Optional, offset into array
Optional, if true
copy in range [0,1], otherwise copy in range [0,255] (default)
Self
Copy components into array
in RGBA order.
Typed array
Optional, offset into array
Optional, if true
copy in range [0,1], otherwise copy in range [0,255] (default)
Self
Check if the color matches this color.
Optional
epsilon: numberOptional, epsilon for comparison
Check if the color matches this color.
Optional
epsilon: numberOptional, epsilon for comparison
Set components.
Red
Green
Blue
Optional
a: numberOptional, alpha
Self
Set from HSL components.
Hue
Saturation
Lightness
Optional
a: numberOptional, alpha
Self
Set from HSV components.
Hue
Saturation
Value
Optional
a: numberOptional, alpha
Self
Get a CSS color string (hex) in format #rrggbbaa
.
CSS hex string
Static
blackStatic
blueStatic
fromStatic
fromStatic
fromHSLOptional
a: numberStatic
fromHSVOptional
a: numberStatic
greenStatic
redStatic
transparentStatic
white
RGBA color.
Remarks
In [0,1] range.
Methods generally mutate the instance. Create new instances with Color.clone.