Skip to content

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

Funktion: customColorCss() ​

customColorCss(hex, options?): string

Beta

Generate the [data-pantoken-color="custom"] Regel für ein Brand-Hex: es deklariert die abgeleiteten --instui-primitive-color-custom-custom* Schritte und mappt die Brand-Primitiven exakt auf diese, wie die ausgelieferten Skalen.

Parameter ​

hex ​

string

A #rgb/#rrggbb Brand-Farbe.

options? ​

CustomColorCssOptions = {}

CustomColorCssOptions.

Rückgabe ​

string

Die CSS-Regeln als String.

Wirft ​

TypeError wenn hex kein gültiger Hex-Farbwert ist.