Color
object
color : Useful namespace for helping with color utility functions
object
color.hexToRgba(hex) ⇒ 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 |