Class: Color

Color.Color(rgba)

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

Color.Color(hsl)

new Color(hsl)

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
hsl Object an object of hue, saturation, and lightness values (0.0 to 1.0)
Source:
Example
new Color({
    h: 0.2,
    s: 0.5,
    l: 1
})