项目作者: sonicdoe

项目描述 :
A list of all CSS color keywords.
高级语言: JavaScript
项目地址: git://github.com/sonicdoe/css-color-keywords.git
创建时间: 2017-01-20T17:24:33Z
项目社区:https://github.com/sonicdoe/css-color-keywords

开源协议:ISC License

下载


css-color-keywords

A list of all CSS color keywords.

This list contains all CSS color keywords specified in:

See MDN for an overview of all colors.

Installation

  1. $ npm install css-color-keywords --save

Usage

  1. const cssColorKeywords = require('css-color-keywords')
  2. cssColorKeywords.black // #000000
  3. cssColorKeywords.orange // #ffa500

Returns an object where each key is a keyword (e.g. black) and the value is
the keyword’s RGB hex value (e.g. #000000).

Even though CSS color keywords are case-insensitive, this list only contains
lowercase keywords (and returns lowercase RGB hex values).

Changelog

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

License

css-color-keywords is licensed under the ISC license.
See LICENSE for the full license.