color-name
npmv2.1.1A list of color names and its values
Safe to adopt
Yes — color-name scores well across adoption, maintenance, weight, supply chain, and licensing. 349.8M downloads per week and 3 known dependents. Last published 49 days ago. 3 releases in the last 2 years.
- AAdoption: grade A, Excellent.
349.8M downloads per week and 3 known dependents.
- AMaintenance: grade A, Excellent.
Last published 49 days ago. 3 releases in the last 2 years.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 6.2 KB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 3 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding color-name to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- node >=12.20
- Module format
- ESM only
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the color-name README.
import colors from 'color-name';
colors.red // [255,0,0]color-name vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| color-namethis page | 349.8M | 3 | MIT | 1 month ago |
| color-convert | 342.8M | 1 | MIT | 6 days ago |
| color | 51.9M | 3 | MIT | 6 days ago |
| @csstools/css-color-parser | 0 | 2 | MIT | 5 days ago |
| rgb2hex | 0 | 1 | MIT | 5 days ago |
| @react-native/normalize-colors | 0 | 3 | MIT | 6 days ago |
Used by
Popular packages that depend on color-name.
Plain color conversion functions
Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
Parser and generator for CSS color strings
Relationship graph
Dependencies (left) and dependents (right) of color-name.
Frequently installed together
ECMAScript parser
TypeScript definitions for estree
Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-env-preset
Lodash modular utilities.
React is a JavaScript library for building user interfaces.
React package for working with the DOM.
An AST-based pattern checker for JavaScript.
Prettier is an opinionated code formatter
Node's event emitter for all engines.
No description provided.
Delightful JavaScript Testing.
A library to create a trace of your node app per Google's Trace Event format.
Release history
3 releases in the last two years, typically about 252 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 2.1.1latest | 1 month ago | 6.2 KB | MIT |
| 2.1.0 | 10 months ago | 6.2 KB | MIT |
| 2.0.2 | 1 year ago | 6.1 KB | MIT |
| 2.0.0 | 3 years ago | 6.1 KB | MIT |
| 1.1.4 | 8 years ago | 6.5 KB | MIT |
| 1.1.3 | 9 years ago | — | MIT |
| 1.1.2 | 9 years ago | — | MIT |
| 1.1.1 | 10 years ago | — | MIT |
| 1.1.0 | 10 years ago | — | MIT |
| 1.0.1 | 11 years ago | — | Unlicense |
| 1.0.0 | 11 years ago | — | unlicensed |
| 0.0.2 | 11 years ago | — | unlicensed |
| 0.0.1 | 11 years ago | — | unlicensed |
Overview
color-name is an npm package that a list of color names and its values. It is extremely widely used, with about 349.8M downloads per week and 3 known dependents in the graph. The latest version is 2.1.1, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need a list of color names and its values and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (349.8M weekly downloads).
- Clear open-source license (MIT).
- Zero runtime dependencies — minimal footprint.
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use color-name?
Yes — color-name scores well across adoption, maintenance, weight, supply chain, and licensing. 349.8M downloads per week and 3 known dependents. Last published 49 days ago. 3 releases in the last 2 years.
How do I install color-name?
Run `npm install color-name` to add color-name to your npm project.
What license is color-name released under?
color-name is distributed under the MIT license.
How popular is color-name?
color-name has approximately 349,832,686 downloads per week and 3 known dependent packages.
Is color-name still maintained?
The most recent release of color-name (v2.1.1) was published 1 month ago.
Does color-name run install scripts?
No. color-name does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.