Skip to content

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

関数: deriveCustomColorScale() ​

deriveCustomColorScale(hex, tokens?): CustomColorScale

ベータ

Derive the custom プリミティブスケールをブランドの16進カラーから導出します。入力は、その参照明度(配布されている13ファミリーの平均OKLCH明度)に最も近いステップにアンカーされ、各ステップは入力の色相で参照明度に沿って再構築されます。したがってアンカーステップは入力に近づきますが、必ずしも完全に一致するとは限りません。 )

パラメーター ​

hex ​

string

A #rgb/#rrggbb ブランドカラー。

tokens? ​

読み取り専用 Token[]

プリミティブステップの色値を解決するためのオプショントークン配列またはマップ.

戻り値 ​

CustomColorScale

The CustomColorScale。

例外 ​

TypeError — hex が有効な16進カラーでない場合に投げられます。