Closed san closed 10 years ago
Hi, I have a color field in my form which is optional. So, my default value is supposed to be blank, but when "pick-a-color" is initialized, it defaults to #000000 instead of blank. I tracked down the code and found this:
myColorVars.defaultColor = tinycolor($thisEl.val()).toHex();
It's actually tinycolor which returns #000000 even when the val() is blank. I think it would be nice to allow blank value on init.
val()
What do you think.
Thanks, San
Fixed in your pull request https://github.com/lauren/pick-a-color/pull/27
Hi, I have a color field in my form which is optional. So, my default value is supposed to be blank, but when "pick-a-color" is initialized, it defaults to #000000 instead of blank. I tracked down the code and found this:
myColorVars.defaultColor = tinycolor($thisEl.val()).toHex();
It's actually tinycolor which returns #000000 even when the
val()
is blank. I think it would be nice to allow blank value on init.What do you think.
Thanks, San