Built for Lyft·Now free for everyone

OKLCH vs HSL
The science of better color

Why perceptual uniformity matters for gradients, accessibility, and creating truly harmonious color palettes.

Try OKLCH in ColorBoxFree forever · No account needed

The "50% lightness" lie

In HSL, 50% lightness produces wildly different perceived brightness across hues. Yellow looks almost white, while blue looks almost black.

HSL at 50% lightness

Red

Yellow

Green

Cyan

Blue

Magenta

OKLCH at 65% lightness (perceptually equal)

Red

Yellow

Green

Cyan

Blue

Magenta

See OKLCH in action

Enter any color and watch ColorBox generate a perceptually uniform palette.

Live Preview
50
100
200
300
400
500
600
700
800

Customize curves, check contrast, export anywhere

Open Editor

The fundamental difference

HSL was designed for simplicity. OKLCH was designed for accuracy.

HSL

Mathematical convenience

  • Same L value, different perceived brightness
  • Gradients go through muddy colors
  • Unpredictable contrast ratios
  • Hard to create balanced palettes

OKLCH

Perceptual accuracy

  • Perceptually uniform lightness
  • Clean, vibrant gradients
  • Predictable accessibility
  • Naturally harmonious palettes

Why this matters for your work

Real-world applications where OKLCH makes a difference.

Accessibility

WCAG contrast ratios become predictable. If two colors have the same L value, you know their contrast will be insufficient.

Design systems

Create color scales where each step looks like the same amount of change. No more eyeballing adjustments.

Dark mode

Invert lightness values and get mathematically correct dark themes. Colors stay harmonious automatically.

UI states

Create hover, active, and disabled states by adjusting L value. Get consistent visual feedback every time.

Use OKLCH in CSS today

Modern browsers support OKLCH natively via the oklch() function.

.button {
  background-color: oklch(55% 0.2 250);
  color: oklch(98% 0.01 250);
}

.button:hover {
  background-color: oklch(45% 0.2 250);
}

Browser support: Chrome 111+, Firefox 113+, Safari 15.4+, Edge 111+

Common questions

What is perceptual uniformity?

Perceptual uniformity means equal numeric changes produce equal perceived visual changes. In OKLCH, changing lightness by 10% always looks like the same amount of change, regardless of hue. HSL lacks this property.

Why does HSL produce muddy gradients?

HSL interpolates in a color space not aligned with human perception. When you blend red and green in HSL, you pass through low-saturation yellows and browns. OKLCH maintains chroma throughout the transition.

What about OKLAB?

OKLAB is the rectangular (Cartesian) version of the same color space. OKLCH is the cylindrical (polar) version with hue as an angle. Both are perceptually uniform. ColorBox supports both.

Should I always use OKLCH instead of HSL?

For design systems, color palettes, and accessibility work, OKLCH is superior. HSL is still fine for quick one-off adjustments where perceptual accuracy doesn't matter.