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