</>PackageGraphPackageGraph

color

npmv5.0.3TypeScript

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

2
Direct dependencies

Runtime packages this one declares itself.

3
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

89 KB
Install size

Unpacked size of this package plus its entire runtime tree.

2
Tree depth

Longest resolved dependency chain below this package.

Licenses in the dependency tree

MIT

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.

PackageWeekly downloadsDependentsLicenseLast release
colorthis page45.5M3MIT9 months ago
color-string01MIT1 day ago
color-convert299.6M1MIT1 day ago
@csstools/css-color-parser02MIT1 day ago
color-name306.6M3MIT1 day ago
postcss249.3M7MIT1 day ago

Dependencies

Declared by color v5.0.3. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (3)

mocha 11.1.0tsd 0.31.2xo 0.60.0

Used by

Popular packages that depend on color.

Relationship graph

Dependencies (left) and dependents (right) of color.

Frequently installed together

Release history

3 releases in the last two years, typically about 53 days apart.

Recent versions of color
VersionPublishedSizeLicense
5.0.3latest9 months ago26 KBMIT
5.0.21 year ago26 KBMIT
5.0.01 year ago26 KBMIT
4.2.34 years ago16 KBMIT
4.2.24 years ago16 KBMIT
4.2.14 years ago16 KBMIT
4.2.04 years ago16 KBMIT
4.1.04 years ago16 KBMIT
4.0.24 years ago16 KBMIT
4.0.15 years ago16 KBMIT
3.2.15 years ago16 KBMIT
4.0.05 years ago16 KBMIT
3.2.05 years ago16 KBMIT
3.1.45 years ago16 KBMIT
3.1.36 years ago16 KBMIT

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

Keywords

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.