Closed mango-unchained closed 3 years ago
Hi,
I added color option to the configuration. const picker = new ColorPickerControl({ container: document.body, color: { r: 255, g: 255, b: 255 } }); This should solve your problem.
Hi, mango, for dynamic updates, I use the following code (using the same demo as the repository):
//control update color_pickers.forEach(color_picker => { color_pickers.filter(p=>p!=color_picker).forEach((p) => { p.color.fromRGBa(new-red , new-green , new-blue , new-alpha); p.update(false); }); });
Thanks for the responses, guys, and thanks so much, Ivan, for the update. You're a legend!
Hi, Ivan. The script is great, but I'm trying to set the picker to a certain colour value when it opens. Is there a way to do this? I've been throwing arguments into picker.update, but so far nothing has worked. Thanks.