• Utility to format an hexadecimal string into a CSS hexadecimal string.

    Type Parameters

    • T extends string

    Parameters

    • hex: T

      The hexadecimal code.

    Returns `#${T}`

    Example

    hex('FFF'); // -> '#FFF'
    hex('0F0F0F'); // -> '#0F0F0F'

Generated using TypeDoc