color
npmv5.0.3TypeScriptColor conversion and manipulation with CSS string support
Safe to adopt
Yes — color scores well across adoption, maintenance, weight, supply chain, and licensing. 45.5M downloads per week and 3 known dependents. Last published 299 days ago. 3 releases in the last 2 years.
- AAdoption: grade A, Excellent.
45.5M downloads per week and 3 known dependents.
- BMaintenance: grade B, Good.
Last published 299 days ago. 3 releases in the last 2 years.
- AWeight: grade A, Excellent.
Pulls in 3 transitive packages, about 89 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- 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 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.
Licenses in the dependency tree
Every license you inherit by installing color, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- node >=18
- Module format
- ESM only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the color README.
const color = Color('#7743CE').alpha(0.5).lighten(0.5);
console.log(color.hsl().string()); // 'hsla(262, 59%, 81%, 0.5)'
console.log(color.cmyk().round().array()); // [ 16, 25, 0, 8, 0.5 ]
console.log(color.ansi256().object()); // { ansi256: 183, alpha: 0.5 }color 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 |
|---|---|---|---|---|
| colorthis page | 45.5M | 3 | MIT | 9 months ago |
| color-string | 0 | 1 | MIT | 1 day ago |
| color-convert | 299.6M | 1 | MIT | 1 day ago |
| @csstools/css-color-parser | 0 | 2 | MIT | 1 day ago |
| color-name | 306.6M | 3 | MIT | 1 day ago |
| postcss | 249.3M | 7 | MIT | 1 day ago |
Dependencies
Declared by color v5.0.3. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (2)
Dev (3)
Used by
Popular packages that depend on color.
Relationship graph
Dependencies (left) and dependents (right) of color.
Frequently installed together
Native navigation primitives for your React Native app.
More powerful alternative to Animated library for React Native.
Simple and complete React Native testing utilities that encourage good testing practices.
Declarative API exposing native platform touch and gesture system to React Native
Tools for making advanced Metro bundler features work
React Native for Web
React Server Components bindings for DOM using Webpack. This is intended to be integrated into meta-frameworks. It is not intended to be imported directly.
The Expo SDK
Error overlay for universal Expo apps.
React is a JavaScript library for building user interfaces.
A framework for building native apps using React
TypeScript definitions for react
Release history
3 releases in the last two years, typically about 53 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 5.0.3latest | 9 months ago | 26 KB | MIT |
| 5.0.2 | 1 year ago | 26 KB | MIT |
| 5.0.0 | 1 year ago | 26 KB | MIT |
| 4.2.3 | 4 years ago | 16 KB | MIT |
| 4.2.2 | 4 years ago | 16 KB | MIT |
| 4.2.1 | 4 years ago | 16 KB | MIT |
| 4.2.0 | 4 years ago | 16 KB | MIT |
| 4.1.0 | 4 years ago | 16 KB | MIT |
| 4.0.2 | 4 years ago | 16 KB | MIT |
| 4.0.1 | 5 years ago | 16 KB | MIT |
| 3.2.1 | 5 years ago | 16 KB | MIT |
| 4.0.0 | 5 years ago | 16 KB | MIT |
| 3.2.0 | 5 years ago | 16 KB | MIT |
| 3.1.4 | 5 years ago | 16 KB | MIT |
| 3.1.3 | 6 years ago | 16 KB | MIT |
Overview
color is an npm package that color conversion and manipulation with CSS string support. It is extremely widely used, with about 45.5M downloads per week and 3 known dependents in the graph. The latest version is 5.0.3, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need color conversion and manipulation with CSS string support and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (45.5M weekly downloads).
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use color?
Yes — color scores well across adoption, maintenance, weight, supply chain, and licensing. 45.5M downloads per week and 3 known dependents. Last published 299 days ago. 3 releases in the last 2 years.
How do I install color?
Run `npm install color` to add color to your npm project.
How many dependencies does color have?
color declares 5 direct dependencies and pulls in 3 packages in total once its runtime tree is resolved totalling about 89 KB on disk.
What license is color released under?
color is distributed under the MIT license.
How popular is color?
color has approximately 45,526,658 downloads per week and 3 known dependent packages.
Is color still maintained?
The most recent release of color (v5.0.3) was published 9 months ago.
Does color run install scripts?
No. color does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.