File: README.md

package info (click to toggle)
node-css-color-names 1.0.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 304 kB
  • sloc: sh: 14; javascript: 10; makefile: 10
file content (48 lines) | stat: -rw-r--r-- 787 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
css-color-names
===============

A JSON Object of css color names mapped to their hex value

Usage
-----

``` js
var csscolors = require('css-color-names');
console.dir(csscolors);
```

yields

``` json
{
  "aqua": "#00ffff",
  "aliceblue": "#f0f8ff",
  "antiquewhite": "#faebd7",
  "black": "#000000",
  "blue": "#0000ff",
  ...
}
```

How was this list generated?
----------------------------

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`

Installation
------------

    npm install css-color-names

License
-------

MIT