• Returns whether the given string is a valid hex color

    Parameters

    • Optionalhex: string

      the hex color to check

    Returns boolean

    whether the given string is a valid hex color

    isHex('#ff0000');