Skip to content

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

関数: customColorCss() ​

customColorCss(hex, options?): string

ベータ

Generate the [data-pantoken-color="custom"] ルールをブランドの16進カラーから生成します: これは派生した --instui-primitive-color-custom-custom* ステップを宣言し、ブランドのプリミティブをそれらに再マッピングします。まさに配布されているスケールと同様です。

パラメーター ​

hex ​

string

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

options? ​

CustomColorCssOptions = {}

CustomColorCssOptions.

戻り値 ​

string

CSSルールの文字列。

例外 ​

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