color-names
color-names copied to clipboard
Question about the name
It seems to me that this package should be named something like color-name-codes
instead.
To use this package, as you would any other, you can do something like:
var colorNames = require('color-names');
colorNames['Abbey']; // #4c4f56
It looks like you already have to know the name of the color to use the package, and in return you get its hex code back.
What the name of the package tells me is that I'll be able to get a color name from an input (hex code or something else) but that's not the case.
Maybe I'm looking at this all wrong and only from one angle. I wanted to ask anyway.
Thank you!
Yes, the name almost implies a lookup from rgb/hex to color name, which is what this project should also provide.