Launching April 6, 2027
color-space

color-space

162 color spaces, one tiny API, verified

Free266 impressionslaunches Apr 6

An open collection of color spaces: one minimal API, verified formulas, conventional ranges, zero dependencies. Covers 162 spaces from sRGB, Display P3 and Rec. 2020 through OKLCH, CIELAB, camera log formats and appearance models like CAM16. Backends: JS, WASM, GLSL/WGSL, LUT (.cube for Resolve, Premiere, OBS, ffmpeg) and ICC. Not a color toolbox: no parsing, interpolation or gamut mapping. Released under CC0.

A tiny, zero-dependency API providing verified formulas for 166 color spaces with JS, WASM, GLSL/WGSL, LUT and ICC back-ends.

for
Developers needing accurate color-space conversions for web, graphics, video or scientific apps.
pricing
free
license
CC0-1.0
colorjs/color-space 387 31JavaScriptupdated 4 days ago
works withGLSLWGSLICC profiles

Key features

6 features of color-space
  • Comprehensive catalog — Covers 166 color spaces from sRGB to HDR and camera logs.
  • Multiple back-ends — JS, WebAssembly, GLSL/WGSL shaders, .cube LUTs and ICC profiles.
  • Zero dependencies — A single tiny module (0.4-1.5 kB) with no external packages.
  • Tree-shakable imports — Import only the needed space to keep bundle size minimal.
  • Reference-tested formulas — Formulas verified against published specs and independent implementations.
  • Zero-copy buffer API — Convert whole Float64Array buffers in place via the WASM kernel.

Use cases

  • Convert image colors between sRGB, OKLCH, XYZ, etc. for web design.
  • Generate CSS color() strings with accurate gamut handling.
  • Create .cube LUTs for Resolve, Premiere or OBS from any color space.
  • Perform high-performance batch conversions in a WebAssembly buffer.
  • Embed per-pixel color-space conversion shaders in WebGL or WGSL pipelines.

color-space FAQ

Which color space should I use for palettes?+

Use OKLCH – its lightness is perceptually uniform, so equal steps look equal.

Why do gradients look muddy in sRGB?+

sRGB is gamma-encoded; averaging its values darkens colors. Interpolate in a linear space like OKLab instead.

What does ‘out of gamut’ mean?+

A color that one space can describe but another (or your display) cannot represent; the tool shows the tightest gamut that contains the color.

Are the conversions exact?+

They use closed-form formulas, not look-up tables; round-trips stay within floating-point noise, with documented exceptions.

How can I use the library in shaders?+

Import the GLSL/WGSL module and generate a self-contained function via the provided glsl helper.

Is the library open source?+

Yes, it is released under CC0 public domain dedication.

Summarized by DevHunt from color-space.io · Oct 4, 2026. Details may change; check the official site.