# color-js/color.js

Color conversion & manipulation library by the editors of the CSS Color specifications

Repository: https://github.com/color-js/color.js
Canonical: https://ross.abutalabs.com/products/colorjs
Homepage: https://colorjs.io
Language: JavaScript
License: MIT
License Family: permissive
Topics: cielab, color, color-palette, color-spaces, esm, oklab, oklch, rec2020, srgb, display-p3, interpolation
Last push: 2026-08-25T13:04:50+00:00

## Health v2 (maintenance only)
Score: 97/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 94, longevity 100
- inputs: {"age_days": 2328, "days_push": 8, "days_rel": 40, "gap_med": 22, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2292, forks 96 (observed 2026-08-28T04:06:34.994054+00:00)

## What it is
Color.js is a JavaScript library for color conversion, manipulation, and color science, created by editors of the CSS Color specifications. It supports a wide range of color spaces (sRGB, Display P3, Lab/LCh, OKLab/OKLCh, REC.2020, and more) with proper gamut mapping, DeltaE color difference methods, chromatic adaptation, interpolation, and contrast calculations.

## Use cases
- convert colors between color spaces like srgb, p3, oklch, and lab
- generate color palettes by interpolating between colors
- check WCAG and APCA contrast ratios for accessibility
- compute perceptual color difference with DeltaE 2000
- map out-of-gamut colors to a smaller gamut like sRGB
- parse and output CSS Color 4 color strings
- manipulate color lightness, chroma, and hue programmatically

## When to choose
- you need accurate, standards-based color science rather than naive RGB math
- you work with wide-gamut color spaces like Display P3 or REC.2020
- you need CSS Color 4/5 compatible color parsing and output regardless of browser support
- you want a dependency-free, tree-shakeable library usable in browser or Node

## When to avoid
- you only need simple hex/rgb string parsing and tweaking with minimal bundle size
- you need image-level pixel processing rather than individual color values
- you require a tiny zero-config utility and don't care about color space correctness

## Facets
- artifact type: library
- maturity: active
- function: image-processing, ui-components, developer-tools
- domain: web-development, frontend, graphics, accessibility
- platform: browser, cross-platform
- tags: color-science, color-spaces, css-color-4, oklch, gamut-mapping, color-conversion, delta-e, interpolation, esm, dependency-free, javascript, nodejs

## Member repositories
- color-js/color.js (main) score 97

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:34.994054+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:40:39.881505+00:00, confidence not recorded.
  - readme: https://github.com/color-js/color.js (fetched 2026-08-28T04:06:34.994054+00:00, sha 953bad6c4612)
  - homepage: https://colorjs.io (fetched 2026-08-29T10:21:17.759816+00:00, sha c1627eb4af86)
  - site_page: https://colorjs.io/docs (fetched 2026-08-29T10:21:17.769311+00:00, sha b6e03df61cc1)
  - site_page: https://colorjs.io/docs/the-color-object (fetched 2026-08-29T10:21:17.771054+00:00, sha a81fc2b743c4)
  - site_page: https://colorjs.io/docs/spaces (fetched 2026-08-29T10:21:17.773007+00:00, sha 6049e80c984e)
  - site_page: https://colorjs.io/docs/color-difference (fetched 2026-08-29T10:21:17.775272+00:00, sha 8d9839e95a3f)
  - site_page: https://colorjs.io/docs/manipulation (fetched 2026-08-29T10:21:17.777009+00:00, sha d3cb1cf634fb)
  - site_page: https://colorjs.io/docs/contrast (fetched 2026-08-29T10:21:17.779014+00:00, sha 65e821a5d0b6)
  - site_page: https://colorjs.io/docs/gamut-mapping (fetched 2026-08-29T10:21:17.780927+00:00, sha 6d6edd1ecbc1)
  - site_page: https://colorjs.io/docs/interpolation (fetched 2026-08-29T10:21:17.782614+00:00, sha 539d5fb55c52)
- Data as of 2026-08-30T08:39:29.467469+00:00.
