#B5E1FF TYPE: TOOL

Chroma
Extractor

Drop an image, get a perfect palette. Uses WASM and workers.

Stack
Rust to WASM
Web Workers
Footprint
31kb wasm
120ms per image
Built
A weekend
Nov 2024

Median-cut quantisation compiled from Rust, running against the raw pixel buffer instead of a downsampled thumbnail, so thin accents survive.

How it works

The image is decoded with createImageBitmap, handed to a worker as a transferable, and reduced in WASM. Results come back as a flat Uint8Array the page turns into swatches.

Notes

Exports to CSS custom properties, Tailwind config fragments or a plain hex list.

Changelog

  • v1.1 — Tailwind export and keyboard swatch navigation.
  • v1.0 — First release.

Features

03 included
Median cut in WASM
Full-resolution pass, no thumbnail shortcut.
Transferable buffers
Zero-copy handoff between page and worker.
Three export formats
CSS variables, Tailwind tokens, hex list.
chroma-extractor.example.dev — live
Screenshot of Chroma Extractor
No cookies APP 03 / 13