simonwep / pickr

🎨 Flat, simple, multi-themed, responsive and hackable Color-Picker library. No dependencies, no jQuery. Compatible with all CSS Frameworks e.g. Bootstrap, Materialize. Supports alpha channel, rgba, hsla, hsva and more!
https://simonwep.github.io/pickr
MIT License
4.32k stars 284 forks source link

Programmatically change swatches with JS #266

Closed justingolden21 closed 3 years ago

justingolden21 commented 3 years ago

Hi, I'm aware this isn't being maintained for new features much and is mostly just getting bug fixes.

That being said, I feel like I could at least write down my idea here in case anyone wants to try their hand (or in case there is a way to do it I didn't see in the docs)

I think the ability to change the swatches with JS would be useful. For my use case, I would just be setting them to the most recent colors, but perhaps they could favorite/save colors.

Obviously as a color picker in a simple form or setting where you're just choosing one color for one purpose, this feature doesn't have much use, but in a dedicated color / palette application this could be very useful, and having the ability to control it programmatically would enable complete freedom from the programmer's point of view.

simonwep commented 3 years ago

Duplicate of #70? And what about add/removeSwatch under methods?

simonwep commented 3 years ago

Closing because of inactivity.