parseHexColor

Parses a hex color string and returns a Color object.

Return

A Color object representing the parsed color.

Parameters

hex

The hex color string to parse. It can be in the format of #RRGGBB or #AARRGGBB.

Throws

If the hex string is not in a valid format.