JSPM

css-color-keywords

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7032405
  • Score
    100M100P100Q302929F
  • License ISC

A list of all CSS color keywords.

Package Exports

  • css-color-keywords

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (css-color-keywords) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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

$ npm install css-color-keywords --save

Usage

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 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.