Comparisons · 6
Color format and standard comparisons
Straight answers to the questions that come up once you know both names: which color space to generate in, which contrast model to trust, and which notation belongs where. Each page leads with a verdict and then shows the working.
- OKLCH vs HSLUse OKLCH for anything you generate — ramps, hover states, accessible pairs, gradients — because equal steps in it look equal; keep HSL only for reading palettes that are already written in it.
- WCAG contrast vs APCAConform to WCAG 2.2 because that is what audits and procurement cite, and consult APCA when a technically-passing pair still looks thin — the disagreement between them is usually the interesting part.
- Lab vs OKLabBuild new work in OKLab — it fixes CIELAB’s blue-region hue shift, which is the failure you will actually hit when interpolating — and keep CIELAB where ΔE and existing colour-management tooling require it.
- HEX vs RGBThey are the same color in two notations, so pick by context: HEX to hand someone a value, <code>rgb()</code> when code has to read or modify the channels.
- RGB vs CMYKDesign in RGB and convert to CMYK only at the end, using a profile for the actual press — a formula-based conversion is fine for a mockup and should never be the file you send to print.
- sRGB vs Display P3Author in sRGB and reach for Display P3 deliberately, for accents where the extra saturation earns its place — always behind a fallback, because a P3 value on an sRGB screen without conversion is simply the wrong color.
Why these and not others
A comparison is worth writing when both options are genuinely defensible and the choice has consequences. “HEX vs RGB” makes the list because people ask it constantly even though the answer is that they are the same color — clearing that up is useful. “OKLCH vs HSL” makes it because the answer is decisive and most codebases are still on the wrong side of it.
Pairings where one option is simply obsolete are not here. Neither are matchups between things that do not compete: Lab and CMYK are not alternatives to each other, they are answers to different questions, and a page pretending otherwise would be inventing a decision nobody has to make.