new Color(rgba)
Color class accepts a CSS color string, rgb, hsl data as the input, manipulate the color, and returns a CSS-compatible color string.
Parameters:
| Name | Type | Description |
|---|---|---|
rgba |
Array | an array of red, green, blue values, and an alpha channel value (0.0 to 1.0) |
- Source:
Example
new Color([255,0,0, 0.5]) // 50% transparent