Skip to content

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

Funzione: customColorCss() ​

customColorCss(hex, options?): string

Beta

Genera la [data-pantoken-color="custom"] regola per un brand hex: dichiara i passi derivati --instui-primitive-color-custom-custom* e rimappa le primitive del brand su di essi, esattamente come le scale fornite.

Parametri ​

hex ​

string

Un colore di brand #rgb/#rrggbb.

options? ​

CustomColorCssOptions = {}

CustomColorCssOptions.

Restituisce ​

string

La stringa delle regole CSS.

Lancia ​

TypeError quando hex non è un colore hex valido.