Package Exports
- colors-named
Readme
colors-named
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.