color-space
162 color spaces, one tiny API, verified
Free266 impressionslaunches Apr 6
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
Key features
- 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.





.png?width=64)



