color

color

The color module provides APIs to use and mutate colors.

Classes

RGBAColor

Members

<static> color.parse

Parses a color value and returns a 32-bit integer representing the color. The number is in the form `0x`.

Methods

<static> color(c) → {null|RGBAColor}

Parses a color value and returns a `color.RGBAColor` instance.
Parameters:
Name Type Description
c String | Number | RGBAColor The color to be parsed, a number of the form `0x`, a string (color name found in color_map) or a any of `rgb`, `rgba`, `hsl`, `hsla`, or hex (`#RRGGBB`).
Returns:
An RGBAColor instance or null for failed parsing
Type
null | RGBAColor