OKLCH and Lab Color Converter

Type a colour in any common CSS format and see it in hex, rgb, hsl, oklab, oklch, lab and lch. Colours outside the sRGB range are mapped the way browsers do it.

Use the tool

Loading the tool…

About OKLCH and Lab Color Converter

Convert colours between formats such as hex, RGB, OKLCH and LAB. If a colour is outside the sRGB range that screens show, choose to reduce its chroma, as browsers do, or to clip each channel.

Worked example

Enter `oklch(62% 0.19 260)`. The tool shows the same colour as hex, if it is within the screen range.

Limits

Colours outside the screen range are shown as the nearest colour a screen can display. The result may look different on some screens.

How to use OKLCH and Lab Color Converter

  1. Type or paste a colour.
  2. Choose how to handle colours outside the sRGB range.
  3. Read the values in every format.
  4. Copy the one you need.

Good to know

  • OKLCH has three parts: lightness (L), chroma (C, how colourful) and hue (H, in degrees).
  • Many OKLCH and Lab colours cannot be shown in sRGB. The default reduces chroma until the colour fits, as CSS does. Clipping each channel is the other option.
  • CIE Lab and LCH use the D50 white point, like CSS lab() and lch().
  • Values are shown to 4 decimals for oklab and oklch chroma, 2 for lightness, hue and Lab.

Frequently asked questions

What is OKLCH?

It is a colour space designed so that changing lightness, chroma or hue by the same amount looks like the same change to the eye. That makes it good for building palettes.

Why does my OKLCH colour turn into a different hex?

If the colour is outside sRGB, the hex is the closest colour that fits. A wide-gamut display can show the original.

Is oklch() supported by browsers?

Yes. All current browsers support oklch(), oklab(), lab() and lch().