JSPM

colors-named

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 35645
  • Score
    100M100P100Q143342F
  • License MIT

A array with color names.

Package Exports

  • colors-named

Readme

colors-named

Build & Deploy Open in unpkg npm version Coverage Status

A array with color names. Based on https://www.w3.org/TR/css-color-4/#named-colors

Installation

This package is ESM only: Node 12+ is needed to use it and it must be import instead of require.

npm install colors-named

If you still want to use in CommonJS, you can use dynamic import() to load.

const named = await import('colors-named');

// Fix compiling in typescript.
// https://github.com/microsoft/TypeScript/issues/43329#issuecomment-922544562
const named = await (Function('return import("colors-named")')()) as Promise<typeof import("colors-named")>;

Usage

import named from "colors-named";

console.log(named)                   // => ['aliceblue', 'antiquewhite', 'aqua', ... ]
console.log(named.includes('red'))   // => true
console.log(named.length)            // => 148

Contributors

As always, thanks to our amazing contributors!

Made with action-contributors.

License

Licensed under the MIT License.