Class StypColorStruct<TSelf, TCoords>Abstract

Structured color CSS property value base.

Type Parameters

Hierarchy

Constructors

Properties

hsl: StypHSL

This color in HSL coordinates.

priority: number

CSS property value priority.

The value Important and above means the property is !important. Everything else means normal priority.

The property value with higher priority number takes precedence over the one with lower one.

rgb: StypRGB

This color in RGB coordinates.

type: "rgb" | "hsl"

Color value type corresponding to color coordinates. Either rgb or hsl

Methods

  • Constructs another color value with updated coordinates.

    Parameters

    • coords: Partial<TCoords> | ((this, color) => Partial<TCoords>)

      Either partial color coordinates to apply or a function returning them and accepting this color instance as its only argument. Missing values are taken from this color.

    Returns TSelf

    Updated color value.

Generated using TypeDoc