daattali / colourpicker

🎨 A colour picker tool for Shiny and for selecting colours in plots (in R)
https://daattali.com/shiny/colourInput/
Other
215 stars 28 forks source link

consider adding a warning to colourInput for reverting unsupported color #22

Closed romunov closed 6 years ago

romunov commented 6 years ago

If palette = "limited" is selected and specified color is not in the (limited) list, it will revert to black. Would it possible to add a warning that the function has reverted to some prespecified color?

daattali commented 6 years ago

I don't think it's that bad of a behaviour. I wonder what happens if you create a selectInput() or radio buttons and provide a non-existent value? Anyway, I'm open to a PR if you'd like to add a simple error check for that

romunov commented 6 years ago

I was thinking alongside of a warning, just to give tinkerer a head's up. Or perhaps a sentence about this in the docs. I would consider falling back to some predefined color as perfectly acceptable.