Closed onet4 closed 8 years ago
Hi @onet4,
well, tinyColorPicker can only work with HEX, rgb(a) and hsl(a). There is no way around this.
What you can do is, use renderCallback
to calculate the color name (from an array...) and display this value wherever you need to do so (also as value in a hidden input field).
See demos for how to be able to use renderCallback
.
In the demo you saw, where colorNames
is defined as option, colorNames
is actually only an optional option, not really used by colorPicker but used in renderCallback
. You could use colorNames
in this example also as an "external" variable...
Good luck and cheers
The input value becomes
#NANNANNAN
even when the name is defined in thecolorNames
option under the following conditions,cyan
,red
,transparent
in the input.