@eroyeroy/utils - v0.1.0
    Preparing search index...

    Function isHexColor

    • Returns true if the string is a valid CSS hex color (#rgb or #rrggbb).

      Parameters

      • value: string

        The string to validate.

      Returns boolean

      isHexColor("#fff")    // => true
      isHexColor("#1A2B3C") // => true
      isHexColor("fff") // => false