toColor

Converts a hex string to a color. valid color should start with # and must be at least 7 characters long in total.

Return

The color or null if the string is not a valid color.