Skip to content

pantoken-root / plugins/pantoken/custom-theme-colors/src / deriveScale

Funktion: deriveScale() ​

deriveScale(hex, curve): CustomColorScale

Beta

Derive a full primitive scale from one hex: anchor it at the step with the nearest reference ljushet, then rebuild every step at its reference lightness with the input's hue and a chroma skalad av referensformen.

Parametrar ​

hex ​

string

A hex color accepted by parseHexColor.

curve ​

ReferenceCurve

Output of buildReferenceCurve.

Returnerar ​

CustomColorScale

The CustomColorScale.