Parses a hex color string. Accepts #RGB, #RRGGBB, #AARRGGBB, or the same forms without the leading #. Useful when the color comes from a design tool ("paste this hex into the code").
#RGB
#RRGGBB
#AARRGGBB
#
when hex is not 3, 6, or 8 hex digits.