UNPKG

787 BMarkdownView Raw
1css-color-names
2===============
3
4A JSON Object of css color names mapped to their hex value
5
6Usage
7-----
8
9``` js
10var csscolors = require('css-color-names');
11console.dir(csscolors);
12```
13
14yields
15
16``` json
17{
18 "aqua": "#00ffff",
19 "aliceblue": "#f0f8ff",
20 "antiquewhite": "#faebd7",
21 "black": "#000000",
22 "blue": "#0000ff",
23 ...
24}
25```
26
27How was this list generated?
28----------------------------
29
30In the Makefile you'll see a line like this:
31
32 ./getcolors.sh | ./stringify.js > $(FILE)
33
34The first command scrapes a site for the list,
35and outputs the results separated by newlines. The
36second command creates the JSON object and outputs
37it to stdout, which then gets redirected into
38`css-color-names.json`
39
40Installation
41------------
42
43 npm install css-color-names
44
45License
46-------
47
48MIT