Open thednp opened 5 years ago
Hi @thednp The issue is not related to a bug but to wrong expectations. The initiator of colorPicker accepts color formats that are supported by the browser which are RGB
, rgb
, rgba
, hsl
and hsla
. RGBA
is also supported nowerdays, but I guess colorPicker doesn't (I have to look it up).
You might want to write an input that takes cmyc and convert it to rgb and feed a hidden input with the value so the hidden input triggers the colorPicker but it shows values from the cmyc input field.
If you wrap both inside a <label>
tag, the click event will be transferred to the hidden input and the colorPicker should show.
Hope this helped. Greetings.
Thanks for taking the time to reply.
I'm not using the colorpicker to use it's CMYK value as color for web elements, I know it's not supported, but I use it as a way for people to input a color in any format they have, perhaps some folk has come from print with CMYK values and wants to use those colors into web apps, converted to supported formats like rgb/hex or hsl in the near future.
I suggest you take a look, it won't take much.
This doesn't bother me very much, but if I ever get into a situation where I need CMYK to be used with my favorite colorPicker of all time, well....
Here's the thing: I set an input
Issues:
data-colormode
attribute gets changed tocmy
, weird