A guide to Color Spaces

See a color, palette, gradient or image in every color space. From web to print, pickers to research, 1860 to 2026.

Display & web28

Working and delivery RGB spaces, from the web default to wider display gamuts.

HP & Microsoft, 1996sRGB

RGB remixes12

Hue, saturation and brightness controls built on RGB. Equal steps need not look equal.

Joblove & Greenberg, 1978HSL
Alvy Ray Smith, 1978HSV
Alvy Ray Smith, 1996HWB
Alvy Ray Smith, 1978HSV
Alvy Ray Smith, 1996HWB
John R. Kender, 1976HSI
Hanbury, 2003IHLS
community convention, 2011HCG
Ian Taylor, 2012HCL
Darel Rex Finley, 2006HSP
Kuzma Shapran, 2012HCY
Osvaldo Severino Jr & Adilson Gonzaga, 2009HSM
Bratkova et al., 2009oRGB

Perceptual58

Coordinates for comparing colors, building palettes and predicting appearance.

Björn Ottosson, 2020OKLCH
Li et al., 2017CAM16
Li et al., 2017CAM16
Björn Ottosson, 2020OKLab
Alexei Boronine, 2012HSLuv
Alexei Boronine, 2012HPLuv
Google, 2021HCT
Björn Ottosson, 2021Okhsl
Björn Ottosson, 2021Okhsv
Björn Ottosson, 2021Okhwb
Björn Ottosson, 2021OKLrAB
Björn Ottosson, 2021OKLrCH
Konovalenko et al., 2021proLab
Li & Luo, 2024sUCS
Luke Hellwig & Mark Fairchild, 2020IgPgTg
Görkem Yıldız, 2026HelmGen
Safdar et al., 2017JzAzBz
Safdar et al., 2017JzCzHz
Fritz Ebner & Mark Fairchild, 1998IPT
Safdar et al., 2017IzAzBz
Mark Fairchild & Garrett Wyble, 2010hdr‑IPT
Huang et al., 2024IaPbP
Kenneth Moreland, 2009Msh
Safdar et al., 2021ZCAM
Li & Luo, 2024sCAM
Mark Fairchild, 1996RLAB
Luo et al., 1996LLAB
Robert W. G. Hunt, 1994Hunt
Sherman Lee Guth, 1995ATD95

Colorimetry & research23

The measurement foundations, the eye, and specialized research coordinates.

CIE, 1931xyY
Estévez et al., 1979LMS
CIE, 1931xyY
Estévez et al., 1979LMS
Raymond Davis; CIE, 1931Kelvin
Derrington et al., 1984DKL
Hermann von Helmholtz, 1860CIE DSH
Richard Kirk, 2019Yrg
Jyrki Alakuijala et al., 2019XYB
Terrillon & Akamatsu, 2000TSL
Xerox, 1989YES
Ruderman et al., 1998lαβ

Video & broadcast23

Separate brightness from color for broadcast, compression and HDR delivery.

Walter Bruch / Telefunken, 1967YUV
NTSC, 1953–82YIQ
Malvar & Sullivan, 2003YCgCo
Eric Hamilton / C-Cube Microsystems, 1992JPEG YCbCr
Henri de France, 1967YDbDr
Sony / IEC, 2006xvYCC
Julian Fröhlich, 2017ICaCb

Film & camera54

Camera log encodings and working spaces for capturing and grading light.

ARRI, 2010–22LogC3
ARRI, 2010–22LogC3
RED Digital Cinema, 2017Log3G10
SMPTE/DCI, 2006DCDM
RED Digital Cinema, 2007–08REDLog
RED Digital Cinema, 2016–17Log3G12
Panavision / Sony, 2005Panalog
Thomson Grass Valley, 2002ViperLog

Print & paint7

Ink, paint and the measured organization of surface colors.

Eagle Printing Ink Co., 1906CMYK
Albert H. Munsell, 1905Munsell
Johannes Itten, 1961RYB
Albert H. Munsell, 1905Munsell
Johannes Itten, 1961RYB
Louis Ducos du Hauron, 1868–1906CMY

Usage

JavaScript

The whole library: 205 spaces, 64 kB gzipped – every space to every other, both ways.

npm install color-space
import space from 'color-space'

space.rgb.oklch(255, 128, 0)      // → [0.732, 0.186, 53]
space.oklch.rgb(0.65, 0.1, 180)   // → [56.14, 162.97, 145.41]
space.oklch.range                 // [[0,1], [0,0.4], [0,360]]

Or one space alone – the bundle carries nothing else.

import oklch from 'color-space/oklch.js'

oklch.rgb(0.65, 0.1, 180)   // → [56.14, 162.97, 145.41]

Typed: TypeScript declarations ship in the package, for the whole library and for each space alone.

What is a color space?

A coordinate system for color: axes, ranges, and a rule tying the numbers to measurable light. Human vision is trichromatic, with three types of cone cells (S, M, L), so three coordinates are the minimum to describe any color the eye can see. The same orange is rgb(255 128 0), oklch(0.732 0.186 53) and XYZ [49, 36.7, 4.5]. A palette is a handful of chosen colors; a space is a way to write down any color at all.

Color model or color space – what's the difference?

A color model is a shape for the numbers: RGB says three primaries, HSL says hue, saturation and lightness, CMYK says four inks. A color space ties a model to measurable light – which primaries, which white, which curve – so each set of numbers names exactly one color. rgb(255 0 0) is a different red in sRGB, Display P3 and Adobe RGB: one model, three spaces.

Everyday usage calls both spaces – so does CSS's color-mix(in hsl, …), and so does this catalog. A model without an anchor of its own borrows one: HSL and HSV here reshape sRGB, as in CSS.

Which space should I actually use?

It depends on the task:

  • storing and sharing images – sRGB, the web's default;
  • designing palettes and gradients – OKLCH, where equal steps look equal;
  • math on light (blending, blurring, 3D) – linear-light RGB;
  • shooting and grading video – your camera's log space, delivered in Rec. 709 or Rec. 2100;
  • measuring how different two colors look – CIELAB or DIN99o.

To see every space sorted by task, group the catalog by purpose.

What should I use instead of HSL?

OKLCH. It keeps the same three controls – hue, chroma, lightness – but its lightness is trustworthy: in HSL, yellow at L=50 emits about 13 times the light of blue at L=50, so equal L doesn't mean equal brightness. In OKLCH it does. CSS supports oklch() natively.

How do I convert hex to OKLCH?

Type or paste it into the color field at the top, say #ff8000. Every space on the page shows that color at once; in OKLCH it reads 0.732, 0.186, 53, which CSS writes as oklch(0.732 0.186 53). Each dossier's css tab gives the copyable form, and in code it's space.rgb.oklch(255, 128, 0).

Why do my gradients turn muddy in the middle?

Because they're computed in gamma-encoded sRGB, where averaging two colors' numbers produces darker, duller light than actually mixing their light would. Interpolating in OKLab avoids this; in CSS that's linear-gradient(in oklab, red, blue). Every dossier's interpolate row draws the same blend through two spaces side by side, so you can see the difference before choosing.

How do I convert S-Log3 or another camera log to Rec. 709?

Open your camera's log space, such as S-Log3, LogC4 or Apple Log. In its conversion LUT block, choose Rec. 709 and your editor: DaVinci Resolve, Premiere Pro, Final Cut Pro, OBS, ffmpeg and others. Your browser writes the .cube file. It is a technical conversion with no tone mapping: highlights above diffuse white clip, and the look is yours to add.

What does “out of gamut” mean?

A color one space can describe but another – or your screen – can't show. A vivid Display P3 green doesn't exist in sRGB: convert it, and the numbers fall outside the valid range. The atlas keeps this visible: a ⚠ by the current color marks it outside the Limit you pick, Alt held over a plane or strip says which wider gamut a color there needs (P3, Rec. 2020), and out-of-range stretches ghost over a checkerboard.

Why does print look duller than the screen?

A screen emits light; paper reflects what its inks don't absorb. Ink on paper reaches fewer vivid colors – saturated RGB blues, greens and reds fall outside it – so they print duller. Prepress converts through an ICC profile made for the press and paper, such as FOGRA39 for European coated stock or GRACoL in the US. This catalog's CMYK is the plain formula CSS uses for device-cmyk() without a profile – right for the numbers, not a proof of the print.

Which color space should I export photos in?

For the web and for sharing, sRGB: browsers and phones assume it when a file carries no profile. Display P3 keeps more of a vivid scene on Apple and many Android screens, as long as the profile stays embedded. Send Adobe RGB when a print lab asks for it. Keep ProPhoto RGB for 16-bit editing: its gamut is so wide that 8-bit files band.

Are conversions exact? Do round trips lose data?

Conversions are closed formulas, not lookup approximations, and round trips return within floating-point noise. The few exceptions are documented where they occur: OSA-UCS has no closed inverse, and atlas systems like Munsell interpolate between published grades. Output in rgb is never clamped: a color outside sRGB comes back below 0 or past 255, so clamp only when you display it.

They are also checked: every space links the paper or spec it implements, values are tested against colorjs.io wherever the two overlap, and the camera logs against the Academy's official ACES transforms. formula-verification.md records what was checked against what – including a few places where the published papers themselves had errors.

If the numbers differ from another library's, compare ranges: this one keeps each space's conventional ranges – RGB 0–255, Lab lightness 0–100, hue 0–360 – where many flatten everything to 0–1. Every card shows its ranges; in code they're space.oklch.range.

Which of these can CSS write?

Natively rgb(), hsl(), hwb(), lab(), lch(), oklab(), oklch(), plus color() for Display P3, Adobe RGB, ProPhoto, linear sRGB and XYZ (D65 and D50). CSS's rec2020 is a pure 2.4 gamma, not the BT.2020 curve of this catalog's Rec. 2020 – the same numbers would name a different color. Each dossier's css tab writes the current color in copyable form; spaces CSS lacks ship as ICC profiles or LUTs instead.

How do colors look to color-blind people?

Open View and pick a Vision: red-blind (protanopia), green-blind (deuteranopia) or blue-blind (tritanopia). The catalog redraws as that eye sees it, so you can check that the colors of a palette stay apart. About 1 in 12 men have a color vision deficiency, by the NEI's count.

Where's Pantone, NCS, RAL?

Those are licensed products: their colors are defined by data the owners sell, not by published formulas – so there's no open math to implement, and redistributing their tables wouldn't be legal. Close relatives whose math is public are here: Munsell (its 1943 renotation is public record) and RAL Design (defined directly in CIELAB). Any system whose math was ever published belongs here; suggest one that's missing.

Alternatives

Choosing a color library? color-space converts the most spaces of any listed here, camera logs and video included, each in both directions. The table shows where another tool fits better.
ToolSpacesCamera logsLuma–chromasRGBToolkitSizeSpeedTargets
color-space20531160–255
parse mix ΔE contrast CVD
62 kBJS, WASM, GL, LUT, ICC, OCIO, MCP, Figma, VS Code, CLI, web
culori30–10–1
parse mix gamut ΔE contrast CVD
23 kBJS
colorjs.io51––0–1
parse mix gamut ΔE contrast
34 kBJS, web
chroma-js11––0–255
parse mix ΔE contrast palettes
17 kBJS
@texel/color16––0–1
parse gamut ΔE
9 kBJS
colour-science1282460–1
ΔE CVD
––Python, LUT
ColorAide77––0–1
parse mix gamut ΔE contrast CVD palettes
––Python
colorspace (R)9––0–1
mix contrast CVD palettes
––R, web
OpenColorIO5711–0–1
gamut
––C++, Python, GL, LUT, ICC
Bruce Lindbloom22––0–1, 0–255
ΔE
––web
oklch.com9––0–255
parse gamut
––web

From each project's own source, package or page, 2026-10-18.

Copied