A list of all CSS color keywords.
npm install css-color-keywords> A list of all CSS color keywords.
This list contains all CSS color keywords specified in:
- CSS Level 1
- CSS Level 2 (Revision 1)
- CSS Color Module Level 3
- CSS Color Module Level 4
See MDN for an overview of all colors.
``sh`
$ npm install css-color-keywords --save
`js
const cssColorKeywords = require('css-color-keywords')
cssColorKeywords.black // #000000
cssColorKeywords.orange // #ffa500
`
Returns an object where each key is a keyword (e.g. black) and the value is#000000
the keyword’s RGB hex value (e.g. ).
Even though CSS color keywords are case-insensitive, this list only contains
lowercase keywords (and returns lowercase RGB hex values).
This project follows Semantic Versioning 2.
This list aims to always include all CSS color keywords. If new keywords are
specified, only the minor version will be bumped.
- v1.0.0 (2017-01-20): Initial release
css-color-keywords is licensed under the ISC license.LICENSE` for the full license.
See