Skip to content

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

Συνάρτηση: customColorCss() ​

customColorCss(hex, options?): string

Βήτα

Generate the [data-pantoken-color="custom"] κανόνα για ένα brand hex: δηλώνει τα παράγωγα --instui-primitive-color-custom-custom* στάδια και αντιστοιχίζει τα brand primitives πάνω τους, ακριβώς όπως οι κλίμακες που αποστέλλονται.

Παράμετροι ​

hex ​

string

A #rgb/#rrggbb χρώμα brand.

options? ​

CustomColorCssOptions = {}

CustomColorCssOptions.

Επιστρέφει ​

string

Η συμβολοσειρά των κανόνων CSS.

Ρίχνει ​

TypeError όταν hex δεν είναι έγκυρο hex χρώμα.