npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

color-space

v3.1.0

Published

Open collection of color-spaces

Readme

color-space test npm size

Open collection of color spaces.

Atlas →

Use

import space from 'color-space';

space.rgb.oklch(255, 128, 0);        // → [0.732, 0.186, 53] — modern CSS
space.slog3.rec2020(0.5, 0.5, 0.5);  // camera log → UHD wide gamut
space.rgb.xyz(300, -10, 0);          // → [59.7, 30.6, 2.8] — out-of-range in, unclamped out

// batch
space.rgb.oklch([255, 128, 0,  0, 255, 128]); // [0.732, 0.186, 53,  0.875, 0.234, 151]

// meta
space.lab.range;                     // [[0, 100], [-125, 125], [-125, 125]]

Individual spaces:

import oklch from 'color-space/oklch.js';
oklch.rgb(0.65, 0.25, 180);          // matches CSS oklch(0.65 0.25 180)

Imports

  • color-space – All 162 interconnected spaces · 55 kB gzip
  • color-space/<name>.js – One standalone space
  • color-space/lite – 27-space working set · 9 kB gzip
  • color-space/wasm – lite set as WASM · bare .wasm included
  • color-space/gl – GLSL/WGSL shader source
  • color-space/lut.cube LUTs for Resolve, Premiere, OBS, ffmpeg — verified vs ACES
  • color-space/icc – Matrix + TRC or CLUT profiles
  • color-space/data.json – Channels, ranges, provenance, references, graph, gamuts
  • npx --yes --package color-space color-space-mcp – MCP agent tools: convert · space · spaces · cube

Upgrading from v2?

Spaces

Display & web sRGB · Display P3 · Rec. 2020 · Linear-light sRGB · Rec. 709 · ProPhoto RGB · Adobe RGB (1998) · DCI-P3 · Linear Display P3 · Linear Rec. 2020 · Linear Adobe RGB (1998) · Linear ProPhoto RGB · scRGB · RIMM RGB · CIE RGB · NTSC RGB (1953) · PAL / SECAM RGB · Apple RGB · SMPTE-240M

Cylindrical HSL · HSV / HSB · HWB · HSI · HCG · HCL · HSP · HCY · HSM

Perceptual — modern OKLCH · OKLab · HCT · Okhsl · Okhsv · Okhwb · OKLrAB · OKLrCH · SRLAB2 · proLab · sUCS · IgPgTg

Perceptual — CIE classic CIELAB · CIELChab · CIELUV · HSLuv · CIELChuv · CIELAB D65 · CIELCh D65 · HPLuv · DIN99o Lab · DIN99o LCh · DIN99d · Hunter Lab · CIE 1960 UCS · CIE 1964 UVW · Adams–Nickerson Lab

HDR & wide gamut ICtCp · Jzazbz · Rec. 2100 PQ · Rec. 2100 HLG · JzCzHz · IPT · Izazbz · Linear Rec. 2100 · hdr-IPT · hdr-CIELAB · ICaCb

Colorimetry & vision CIE XYZ (D65) · CIE xyY · LMS · CIE XYZ (D50) · CIE 1976 u′v′ · CCT + Duv · Color temperature (Kelvin) · Maxwell triangle · Wavelength · Absolute XYZ D65 · MacLeod–Boynton · DKL · Grayscale · Dominant wavelength / DSH · rg chromaticity · Yrg (Kirk 2019)

Video & broadcast BT.709 Y′CbCr · BT.2020 Y′CbCr · BT.601 525-line Y′CbCr · BT.601 625-line Y′CbCr · YCbCr (parameterized) · YUV · YIQ · YPbPr · YCgCo · JPEG YCbCr · YDbDr · YcCbcCrc · xvYCC · SMPTE-C · PhotoYCC

Film & camera ACEScg · ACEScc · ARRI LogC3 · Sony S-Log3 · Sony S-Gamut3.Cine · ACES2065-1 · ACEScct · ARRI LogC4 · Cineon · DaVinci Wide Gamut / Intermediate · Sony S-Log2 · Panasonic V-Log · RED Log3G10 · Canon Log · Canon Log 2 · Canon Log 3 · Fujifilm F-Log · Fujifilm F-Log2 · Nikon N-Log · Apple Log · Blackmagic Film Gen 5 · DJI D-Log · FilmLight T-Log / E-Gamut · DCDM X′Y′Z′ · Sony S-Log · ACESproxy · ERIMM RGB · Leica L-Log · GoPro Protune · Xiaomi Mi-Log · OPPO O-Log · REDLog · REDLogFilm · RED Log3G12 · Panalog · ViperLog · Filmic Pro 6

Appearance models CAM16 · CIECAM02 · CAM16-UCS · ZCAM · CAM02-UCS · CAM16-LCD · CAM16-SCD · CAM02-LCD · CAM02-SCD · Hellwig 2022 · RLAB · LLAB · Nayatani 95 · Hunt · ATD95

Print & physical CMYK · Munsell · RYB · CMY · RAL Design · Coloroid · Ostwald

Specialty & research XYB · OSA-UCS · TSL · YES · Ohta I₁I₂I₃ · lαβ

Motivation

A complete collection of color spaces: one minimal API, verified formulas. While alternatives focus on digital color spaces, this project takes broader perspective, covering historical and cross-disciplinary spaces as well. Side effects: corrected papers, color education, test cases for JS→WASM compilers (porffor, jz).

It is not a color toolbox — parsing, interpolation, ΔE, gamut mapping, contrast, palettes, alpha stay out. Pantone, NCS, RAL Classic, and similar licensed swatch catalogs aren't open and stay out as well.

Credits

Thanks to the researchers, theorists, specifiers, implementors — and the libraries that informed this one.

| Library | Spaces | Ranges | Specialty | Backends | Speed (op/s) | |---|---:|---|---|---|---:| | color-space | 162 | Conventional | ✅ | JS · WASM · GLSL/WGSL · LUT · ICC | 36.4 | | color-space/wasm | 27 | Conventional | — | WASM | 1.3–2.5× JS batches | | culori | ~35 | 0–1 | ❌ | JS | 16.1 | | colorjs.io | ~40 | 0–1 | some | JS | 0.7 | | texel/color | ~16 | 0–1 | ❌ | JS | 15.9 | | chroma-js | ~12 | mixed | ❌ | JS | 3.4 | | d3-color | 6 | mixed | ❌ | JS | 34.4 |

Full comparison · npm run benchmark