Converts a hex string to a color.
If it can't be converted null is returned.
Parameters
hex: string
A hexadecimal color string. (i.e. #CCCCCCFF or CCCCCC)
Returns null | object | object
hslToRgb
hslToRgb(h: number, s: number, l: number): object
Converts an HSL color value to RGB. Conversion formula
adapted from http://en.wikipedia.org/wiki/HSL_color_space.
Assumes h, s, and l are contained in the set [0, 1] and
returns r, g, and b in the set [0, 255].