Skip to content

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

Funkcja: customColorCss() ​

customColorCss(hex, options?): string

Beta

Generuje the [data-pantoken-color="custom"] regułę dla koloru marki w formacie hex: deklaruje pochodne --instui-primitive-color-custom-custom* kroki i mapuje na nie prymitywy marki, dokładnie jak dostarczone skale.

Parametry ​

hex ​

string

Kolor marki w formacie #rgb/#rrggbb.

options? ​

CustomColorCssOptions = {}

CustomColorCssOptions.

Zwraca ​

string

Ciąg reguł CSS.

Rzuca ​

TypeError gdy hex nie jest poprawnym kolorem hex.