• One of the many available factories for Color. This variant has a single parameter that follows the CSS suite of describing colors as hexadecimal strings.

    Example usage:

     const colorRed = ColorHEX('#ff0000')
    const colorTransparentGreen = ColorHEX('#00ff0010')

    Supported formats:

    Basically all commonly used hexadecimal color syntaxes are supported, but here is a full list:

    • '#RRGGBB'
    • '#RRGGBBAA'
    • '#RGB'
    • '#RGBA'
    • 'RRGGBB'
    • 'RRGGBBAA'
    • 'RGB'
    • 'RGBA'
    • '0xRRGGBB'
    • '0xRRGGBBAA'
    • '0xRGB'
    • '0xRGBA'

    For more convenience factories, see:

    Returns

    Color object. Please refer to Color API document, on extended information how to use LCJS Colors.

    Parameters

    • hexColor: string

      Hexadecimal value for constructing a Color. Eq. '#FF0000' = Red

    Returns Color