Sphinxxxx/vanilla-picker

Request - please remove colorNames?

Closed this issue · 2 comments

Hey @Sphinxxxx

Thanks for this color picker library, it looks like a nice alternative to jQuery-Minicolors.

My main concern is the cryptic colorNames feature: https://github.com/Sphinxxxx/vanilla-picker/blob/master/dist/vanilla-picker.js#L85

Could you please consider removing it?

It looks malicious on first glance. After reading the comments in more depth, it's apparent that this was built with good intentions. But this is a case where being clever to save a few bytes isn't doing anyone any favors.

It makes the code very difficult to interpret, and the feature itself will probably go unnoticed by the vast majority of users. Thanks for the consideration.

Thanks for your feedback! I never considered it might look malicious, so I'll probably replace it with the uncompressed list of color names.

In the meantime, if you don't need the ability to parse color names at all, please give vanilla-picker-mini a try. Color name parsing is the only real feature missing there (no NPM package though).

@Sphinxxxx Oh awesome, I didn't see the vanilla-picker-mini variant... I'll just use that instead 👍

Thanks again, and keep up the good work!