color : object

Useful namespace for helping with color utility functions

Kind: global namespace

color.hexToRgba(hex) ⇒ object

Converts a hex code into a usable rgba object value

Kind: static method of color
Returns: object - - the calculated rgba value representation of the hex code { r: number, // Red component (0-255) g: number, // Green component (0-255) b: number, // Blue component (0-255) a: number // Alpha component (0-1 for transparency) }

Param Type Description
hex string the hex code including “#” at the beginning