-
-
Notifications
You must be signed in to change notification settings - Fork 365
Empty value #87
Comments
It looks like the Color class has this as its default: https://github.com/mjolnic/bootstrap-colorpicker/blob/master/src/js/colorpicker-color.js#L184 We could work on this, unless there's still plans to incorporate Tiny Color (from #78). Thoughts? |
Yes, when you call setColor a color is always set even if it's an empty string, null or invalid color, then defaults to black. We could change this behaviour in the future by throwing exceptions, but I'm currently working in the next major version, that will integrate Tiny Color (as said in #78). I'd rather center my efforts in that version because Tiny Color has a better color parser, but I'll try to fix all the opened issues with it. Here's a prototype, the idea is using gradients instead of background images, so the colorpicker sizes will be more customizable. |
Updated #88 |
When my colorpicker input is the empty string, the colorpicker fires a change event with an e.color value of
{b: 0, h: 0, s: 0, a:1}
.Is it possible to distinguish this from black?
The text was updated successfully, but these errors were encountered: