Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 21-May-2021 | - | ||||
LICENSE | H A D | 21-May-2021 | 747 | 16 | 12 | |
README.md | H A D | 21-May-2021 | 1.3 KiB | 48 | 30 | |
colors.json | H A D | 21-May-2021 | 3.7 KiB | 149 | 148 | |
package.json | H A D | 21-May-2021 | 505 | 28 | 27 |
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