Skip to content

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

פונקציה: customColorCss() ​

customColorCss(hex, options?): string

בטא

Generate the [data-pantoken-color="custom"] כלל עבור hex של מותג: הוא מצהיר על השלבים הנגזרים --instui-primitive-color-custom-custom* וממפה את הפרימיטיבים של המותג אליהם, בדיוק כמו הסולמות שנשלחו.

פרמטרים ​

hex ​

string

A #rgb/#rrggbb צבע מותג.

options? ​

CustomColorCssOptions = {}

CustomColorCssOptions.

מחזיר ​

string

מחרוזת חוקי CSS.

מייצר שגיאה ​

TypeError כאשר hex אינו צבע hex תקף.