@OPEN-KAPPA/COLORS
    Preparing search index...

    Class CssAbstract

    Class to parse and generate CSS strings.

    Index

    Methods

    • Generate a color from a CSS string. Strings can be:

      • Hex strings: #AABBCC, #AABBCCDD, ...
      • CSS standard color names: red, ...
      • Legacy colors: rgb(255 255 255 / 1), ...
      • New colors: color(srgb 255 255 255 / 1), ...

      Parameters

      • css: string

        The string to parse.

      Returns Color

      The computed color.

      In case of invalid string.

    • Check wether the color supports a CSS representation.

      Parameters

      Returns boolean

      True if supported.

    • Generate a CSS string from a color. Depending on the color space, the string can be a legacy color or a new color.

      Parameters

      Returns string

      The css string.

      If the color space does not support a CSS conversion.