Skip to content

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

Funksjon: deriveScale() ​

deriveScale(hex, curve): CustomColorScale

Beta

Derive a full primitive scale from one hex: anchor it at the step with the nearest reference lysstyrke, then rebuild every step at its reference lightness with the input's hue and a chroma skalert etter referanseformen.

Parametere ​

hex ​

string

A hex color accepted by parseHexColor.

curve ​

ReferenceCurve

Output of buildReferenceCurve.

Returnerer ​

CustomColorScale

The CustomColorScale.