Class Color

Color class represents a color used in swatches in the editor UI. In addition to the CSS color value it allows for a custom label to present the color to the user.

Hierarchy

  • Color

Constructors

Properties

Accessors

Constructors

  • Creates a Color object based on supplied value and optional custom label.

    Parameters

    • value: string
    • Optional label: string

    Returns Color

Properties

value: string

CSS-compatible color value.

Accessors

  • get label(): string
  • Returns the label for the color. If custom label isn't set it returns the real color value.

    Returns string

  • set label(value): void
  • Sets a custom label (name) for the color.

    Parameters

    • value: undefined | string

    Returns void

Generated using TypeDoc