XF 2.1 Any way to automatically convert the input style property value into a color?

ShikiSuen

Well-known member
Supposing that I am asking for a hue value (e.g. "213", like @xf-styleHueMain in the screenshot),
and I want the content of the global variable becomes rgb(hsl(213, 100%, 50%)) so that it can be readable by other color indicators in the same page.

What should I do?

P.S.: One can simply use this hue value (plus the other two parameters of an HSV color) to set all colours he want in this hue by:
mix(mix(HSV-HUE, white, HSV-SATURATION%),black,HSV-VALUE%)
This can make sure the converted color successfully displays in the AdminCP color indicator, unless:

1589443109522.png
1589443437067.png
 
Last edited:
Top Bottom