• One of the many available factories for Color. This variant has a single parameter that follows the CSS suite of describing colors. Can be especially useful when tying LightningChart JS styling together with user front-end application CSS.

    Example usage:

     const colorRed = ColorCSS('red')
    const colorTransparentGreen = ColorCSS('rgba(0, 255, 0, 0.5)')

    Supported formats:

    Basically all commonly used CSS color syntaxes are supported, but here is a list for reference:

    • HEX ('#FF00AA')
    • HEX with transparency ('#FF00AABB')
    • RGBA ('rgba(132, 15, 4, 1.0)')
    • HSL ('hsl(0,100%, 50%)')
    • Color Name ('blue')

    For more convenience factories, see:

    Returns

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

    Parameters

    • color: string

      CSS string description of a color. For example, 'red'.

    Returns Color