Set color components.
Set all components.
StaticBLACKStaticBLUEStaticGREENStaticREDStaticTRANSPARENTStaticWHITEClone 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.
Optionalepsilon: numberOptional, epsilon for comparison
Check if the color matches this color.
Optionalepsilon: numberOptional, epsilon for comparison
Set components.
Red
Green
Blue
Optionala: numberOptional, alpha
Self
Set from HSL components.
Hue
Saturation
Lightness
Optionala: numberOptional, alpha
Self
Set from HSV components.
Hue
Saturation
Value
Optionala: numberOptional, alpha
Self
Get a CSS color string (hex) in format #rrggbbaa.
CSS hex string
StaticfromStaticfromStaticfromOptionala: numberStaticfromOptionala: number
RGBA color.
Remarks
In [0,1] range.
Methods generally mutate the instance. Create new instances with Color.clone.