Skip to content

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

Fungsi: deriveScale() ​

deriveScale(hex, curve): CustomColorScale

Beta

Derive a full primitive scale from one hex: pasang sebagai jangkar pada langkah dengan reference lightness terdekat, lalu bangun ulang setiap langkah pada reference lightness-nya dengan hue dari input dan chroma yang diskalakan oleh bentuk referensi.

Parameter ​

hex ​

string

A hex color accepted by parseHexColor.

curve ​

ReferenceCurve

Output dari buildReferenceCurve.

Mengembalikan ​

CustomColorScale

The CustomColorScale.