• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..22-Nov-2021-

LICENSEH A D22-Nov-2021747 1612

README.mdH A D22-Nov-20211.3 KiB4830

colors.jsonH A D22-Nov-20213.7 KiB149148

package.jsonH A D22-Nov-2021505 2827

README.md

1# css-color-keywords
2
3> A list of all CSS color keywords.
4
5This list contains all CSS color keywords specified in:
6
7- [CSS Level 1](https://www.w3.org/TR/CSS1/#color-units)
8- [CSS Level 2 (Revision 1)](https://www.w3.org/TR/CSS2/syndata.html#value-def-color)
9- [CSS Color Module Level 3](https://drafts.csswg.org/css-color-3/#colorunits)
10- [CSS Color Module Level 4](https://drafts.csswg.org/css-color/#named-colors)
11
12[See MDN for an overview of all colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#Color_keywords).
13
14## Installation
15
16```sh
17$ npm install css-color-keywords --save
18```
19
20## Usage
21
22```js
23const cssColorKeywords = require('css-color-keywords')
24
25cssColorKeywords.black // #000000
26cssColorKeywords.orange // #ffa500
27```
28
29Returns an object where each key is a keyword (e.g. `black`) and the value is
30the keyword’s RGB hex value (e.g. `#000000`).
31
32Even though CSS color keywords are case-insensitive, this list only contains
33lowercase keywords (and returns lowercase RGB hex values).
34
35## Changelog
36
37This project follows [Semantic Versioning 2](http://semver.org/).
38
39This list aims to always include all CSS color keywords. If new keywords are
40specified, only the *minor* version will be bumped.
41
42- v1.0.0 (2017-01-20): Initial release
43
44## License
45
46`css-color-keywords` is licensed under the ISC license.
47See [`LICENSE`](LICENSE) for the full license.
48