Skip to content

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

फंक्शन: deriveScale() ​

deriveScale(hex, curve): CustomColorScale

बीटा

एक हेक्स से पूरा प्रिमिटिव स्केल व्युत्पन्न करें: इसे उस चरण पर एंकर करें जिसकी reference लाइटनेस सबसे नज़दीक है, फिर हर चरण को उसके reference lightness पर इनपुट के hue और reference shape द्वारा स्केल किया गया chroma के साथ पुनर्निर्मित करें।

पैरामीटर ​

hex ​

string

A hex color जो parseHexColor द्वारा स्वीकार किया गया है।

curve ​

ReferenceCurve

buildReferenceCurve का आउटपुट।

वापसी ​

CustomColorScale

The CustomColorScale.