lokesh/color-thief
Grab the color palette from an image using just Javascript. Works in the browser and in Node. observed · 2026-08-28
Health v2 · maintenance only
96/100
- Activity 95
- Release rhythm 96
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 0
- age_days: 5419
- days_rel: 31
- days_push: 30
- n_releases_24m: 12
Adoption not part of the score
13615 stars · 1313 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
Color Thief is a TypeScript library that extracts dominant colors and palettes from images and video in the browser and Node.js, with a small CLI included. It offers perceptual OKLCH quantization, semantic swatches, WCAG contrast helpers, and reactive palette updates via an observe() API.
Use cases
- extract dominant color from an image in javascript
- generate a color palette from a photo
- get vibrant and muted swatches from an image
- dynamically theme a page based on an image's colors
- extract palettes from video frames reactively
- check text contrast against an image's dominant color
- get a color palette from an image in node.js
When to choose
- you need dominant colors or palettes from images in browser or Node with zero dependencies
- you want perceptually uniform palettes (OKLCH) or semantic swatches like Vibrant/Muted
- you need WCAG contrast ratios and text color recommendations from extracted colors
- you want live palette updates from video or canvas elements
When to avoid
- you need full image editing or manipulation, not just color extraction
- you work outside JavaScript/TypeScript ecosystems
- you need server-side processing of very large image batches where a native tool would be faster
Facets
library · maturity active
image-processing data-visualization image-processing frontend web-development graphics browser cli cross-platform color-palette color-extraction typescript oklch dominant-color zero-dependencies wcag-contrast nodejs
2 sources
- readme: https://github.com/lokesh/color-thief · fetched 2026-08-28 · b2d82fa56ef6
- homepage: https://lokeshdhakar.com/projects/color-thief/ · fetched 2026-08-29 · 161f16c3ce01
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| lokesh/color-thief | main | 96 |
For agents
markdown · JSON · MCP: product_card(name="lokesh/color-thief")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem