I am using spectrum.js
as a color picker and I like it a lot. There are two things I can't figure out how to do though. My config looks like:
$("#myColorThing").spectrum({
preferredFormat: "rgb",
showPaletteOnly: true,
showPalette: true,
hideAfterPaletteSelect: true,
color: "",
showInput: true,
allowEmpty: true,
palette: [
[
"rgb(000,000,128)",
"rgb(000,000,255)",
"rgb(000,128,000)",
"rgb(000,128,128)",
"rgb(000,128,255)"
],
[...],...
]
});
My questions are:
- I am only using the
palette
option and mine has 5 rows of 5 cols of colors. The rendered widget looks a bit like a drop-down with a "transparent"/checkered image implying no selection. Fine. If I activate the widget and select a color is there a way to get a do-over? Set the widget back to a no-selection state? - Is related to #1. Is it possible to have that "transparent"/checkered image as a "color" option in the
palette
so that selecting it clears the value of the backing input filed?