PitPik / colorPicker

Advanced javaScript color picker and color conversion / calculation (rgb, hsv, hsl, hex, cmyk, cmy, XYZ, Lab, alpha, WCAG 2.0, ...)
http://www.dematte.at/colorPicker/
MIT License
570 stars 136 forks source link

Gradients Suggestion #53

Open ob7 opened 7 years ago

ob7 commented 7 years ago

The color picker is amazing. Lightning fast, simple to use. I have over 200 running on one page and performance is fine (its why I coudn't use Spectrum - too heavy).

I'd like to let the user build a gradient somehow using this color picker. I know I can just give them multiple pickers and build a gradient from the two colors, but how cool would it be if the picker had gradients built in, where you could add gradient breaks and everything. I think something like https://github.com/greggman/gradient-editor combined with this would be awesome.

Any advice before I start?

PitPik commented 7 years ago

Hi @ob7 , sounds like a nice idea,... I never thought of including things as most people want a lean tool not stuffed with things they don't need... Maybe you want to use the tinyColorPicker. It's easier to implement there (https://github.com/PitPik/tinyColorPicker).

ob7 commented 7 years ago

Thanks for the reply @PitPik,

I really love what you've done with this color picker. Although I'm still trying to understand the code. I'm using the jsColorPicker that targets a couple hundred inputs. But I can't figure out how to clear the values of just one picker using a button outside the picker because I can't figure out how to reference a single picker (since it doesn't use an ID attribute for example).

But anyways, great job with the color picker, and I'll look into tinyColorPicker, although was wanting to use vanilla javascript and somewhere I got the idea tinyColorPicker used jQuery, but I will have a look at it again.