mdbassit / Coloris

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

(feature request) Support for blank state when no color is selected (null) #58

Closed arleybls closed 2 years ago

arleybls commented 2 years ago

It would be nice to have the possibility to clean the color selection (null) and have a blank slate icon as well (i.e. a crossed circle/box). Could also be available as a swatch.

mdbassit commented 2 years ago

That's already supported. You just need to set the clearButton option to true:


Coloris({
  ...
  clearButton: true,
  ...
});