lauren / pick-a-color

an easy-to-use jQuery color picker for Twitter Bootstrap
http://lauren.github.com/pick-a-color/
MIT License
269 stars 89 forks source link

Support watching & setting state programmatically #81

Open charleslaw opened 8 years ago

charleslaw commented 8 years ago

I only have the advanced tab enabled, so only tested with that. Feel free to polish this up more.

charleslaw commented 8 years ago

Rebased on @tfennelly code since I used part of his changes.

Also, this does not set the correct labels for the HSL bars - though that doesn't matter for my use case.

charleslaw commented 8 years ago

I discovered this solution only worked if 1 element was on the page b/c I was updated globals. I changed it to save attrs on the spectrums that are accessible everywhere.