hexcolors

Tools / OKLCH converter

OKLCH converter

Convert any color to OKLCH and OKLab, or design a color directly in OKLCH, and copy the CSS.

Design in OKLCH

Lightness ramp (same chroma and hue)

How to use it

Three quick steps.

  1. Enter a hex code, rgb(), hsl() or a color name.
  2. Copy the oklch() or oklab() value for your CSS.
  3. Or drag the sliders to design a color directly in OKLCH.

Good to know

Get better results.

  • OKLCH lightness is perceptual, so equal steps look equally different. That makes generated scales smoother than HSL.
  • Very high chroma may fall outside the sRGB range. The tool warns you and shows the nearest displayable color.
  • oklch() works in current versions of all major browsers.

Common questions

What is OKLCH?

A color format based on the OKLab color space. L is perceptual lightness, C is chroma (how colorful) and H is the hue angle.

Why use OKLCH instead of HSL?

In HSL, colors with the same lightness number can look very different in brightness. In OKLCH, equal lightness looks equal, which makes scales and themes more even.

Can I use oklch() in CSS today?

Yes. It is supported in current browsers. Keep a hex fallback if you must support very old ones.

More tools

Keep going with a related tool.