Skip to content

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

دالة: deriveScale() ​

deriveScale(hex, curve): CustomColorScale

Beta

Derive a full primitive scale from one hex: anchor it at the step with the nearest reference إضاءة، ثم أعد بناء كل خطوة عند إضاءتها المرجعية بلون الإدخال وشدة تشبع تُقاس بالاعتماد على شكل المرجع.

Parameters ​

hex ​

string

A hex color accepted by parseHexColor.

curve ​

ReferenceCurve

مخرجات buildReferenceCurve.

Returns ​

CustomColorScale

The CustomColorScale.