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

How to use setColor? Can't find examples, can't figure it out #24

Closed daattali closed 8 years ago

daattali commented 9 years ago

Hey, I like your plugin, and I want to use it in a package I'm writing in R (programming language). One thing I can't figure out is how to set the color of an existing input? I see that you can somehow "extend" with proto, but I can't figure out - can you show an example?

PitPik commented 9 years ago

Hi @daattali thanks for your comment. I don't understand exactly what you need though... there is no "extending" with proto.. I also don't know what part you're using... setColor is a method of colors.js and colorPicker.js and can also be used by with the implementation examples. setColor can set the values in the color model and if used with colorPicker.js will update the color picker as well,... how to update an input field depends on how you use color picker. Too less information to make wild guesses ;o)