Checks if a string represents a valid hexadecimal color code.
Example
isHex("#ff00ff") // => true
isHex("ff0000") // => false
Parameters
str: string
The string to check for hexadecimal color code.
Returns boolean
A Result object with either a boolean indicating if the input string is a valid
hexadecimal color code, or an Error object if the provided input is not a string.
Checks if a string represents a valid hexadecimal color code.
Example