mdbassit / Coloris

A lightweight and elegant JavaScript color picker. Written in vanilla ES6, no dependencies. Accessible.
https://coloris.js.org/examples.html
MIT License
470 stars 58 forks source link

Feature request: Multiple color select support #86

Closed kevinrode closed 1 year ago

kevinrode commented 1 year ago

Would be nice if there is an option to allow multiple color selection. The value should be a string which is separated by a character like comma or semicolon.

PS: Thanks for this awesome color select tool!!!

melloware commented 1 year ago

Hmm I would be interested in what use case you need to pick multiple colors with the same picker instead of having multiple pickers on your screen?

jepsar commented 1 year ago

The only thing I could come up with are CSS gradients. But there are more properties involved there then just some colors.

kevinrode commented 1 year ago

In my case I used confetti effect realised with jQuery. The function is using a color string with multiple colors separated with a semicolon to create an array which is than used to colorized the snippets of the confetti effect.

So I thought it would be nice to have an easy option to create this color string out of multiple colors. But I will go the way that I will start with one color picker field and if I need more than I can add additional fields via an "add" button. Therefore I have X color picker fields which I will than merge together to one string with multiple colors seperated by semicolon.

So I think that case can be closed. Thanks for your time!