Skip to content

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

関数: deriveScale() ​

deriveScale(hex, curve): CustomColorScale

ベータ

1つの16進値から完全なプリミティブスケールを導出します: 最も近い参照明度を持つステップにアンカーし、次に各ステップを入力の色相と参照シェイプでスケーリングされた彩度(chroma)で参照明度に再構築します。

パラメーター ​

hex ​

string

A hex color accepted by parseHexColor。

curve ​

ReferenceCurve

buildReferenceCurve の出力。

戻り値 ​

CustomColorScale

The CustomColorScale。