Skip to content

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

פונקציה: deriveScale() ​

deriveScale(hex, curve): CustomColorScale

בטא

Derive a full primitive scale from one hex: anchor it at the step with the nearest reference בהירות, ואז בנה מחדש כל שלב בבהירות ההתייחסות שלו עם הגוון של הקלט וכרומה שמוגדלת לפי צורת ההתייחסות.

פרמטרים ​

hex ​

string

A hex color accepted by parseHexColor.

curve ​

ReferenceCurve

Output of buildReferenceCurve.

מחזיר ​

CustomColorScale

The CustomColorScale.