lhl 6ff0e96ad3 8-4-1 | 1 year ago | |
---|---|---|
.. | ||
README.md | 1 year ago | |
css-color-names.json | 1 year ago | |
package.json | 1 year ago |
A JSON Object of css color names mapped to their hex value
var csscolors = require('css-color-names');
console.dir(csscolors);
yields
{
"aqua": "#00ffff",
"aliceblue": "#f0f8ff",
"antiquewhite": "#faebd7",
"black": "#000000",
"blue": "#0000ff",
...
}
In the Makefile you'll see a line like this:
./getcolors.sh | ./stringify.js > $(FILE)
The first command scrapes a site for the list,
and outputs the results separated by newlines. The
second command creates the JSON object and outputs
it to stdout, which then gets redirected into
css-color-names.json
npm install css-color-names
MIT