Market
Pricing
Sign inStart
Field GuideColour
Colour

OKLCH explained: perceptual colour for designers

HSL promised readable colour and nearly delivered. OKLCH keeps the readable part and fixes the lie about lightness, which is why design systems are moving to it.

GradientlyVerified Gradiently account·October 1, 2026·5 min read
Cover: Elm Voyage · GR·5ZYW·1Z

The short version

  • OKLCH describes a colour with three values: perceptual lightness (L), chroma or colourfulness (C) and hue angle (H).
  • Unlike HSL, OKLCH lightness matches how bright colours look to people, so two colours with the same L have similar contrast against white.
  • In CSS it is written oklch(60% 0.2 293), with optional alpha after a slash, and all current major browsers support it.
  • Chroma has no fixed maximum: how much colour is possible depends on the lightness, the hue and the display, and colours beyond the screen's range are mapped back into it.
  • Interpolating gradients in OKLCH or OKLab avoids the grey, muddy middle that sRGB blends produce between distant hues.
On this page
Lightness, chroma and hueOKLCH vs HSL: the same lightness, side by sideHow to write OKLCH in CSSBuilding a scale with OKLCHGamut: when a colour does not exist on screenOKLCH gradients

OKLCH is a way of writing colour as lightness, chroma and hue, where lightness is measured the way human eyes perceive it. In CSS, oklch(60% 0.2 293) is a violet that looks 60% of the way from black to white, with strong colour, at a hue angle of 293 degrees. The practical win for designers is simple: change the hue and keep L the same, and the new colour looks just as light. HSL cannot promise that, and it is the reason OKLCH has become the default in newer design systems, including Tailwind's colour palette.

Lightness, chroma and hue

LLightness

Range

0% to 100% (or 0 to 1)

What it controls

How light the colour looks, as eyes judge it
CChroma

Range

0 upwards, rarely above 0.37

What it controls

How much colour: 0 is grey, higher is more vivid
HHue

Range

0 to 360 degrees

What it controls

Which colour: roughly 30 red, 110 yellow, 140 green, 265 blue
/ AAlpha

Range

0 to 1, or 0% to 100%

What it controls

Opacity, optional
LetterNameRangeWhat it controls
LLightness0% to 100% (or 0 to 1)How light the colour looks, as eyes judge it
CChroma0 upwards, rarely above 0.37How much colour: 0 is grey, higher is more vivid
HHue0 to 360 degreesWhich colour: roughly 30 red, 110 yellow, 140 green, 265 blue
/ AAlpha0 to 1, or 0% to 100%Opacity, optional
Hue angles in OKLCH do not line up with HSL's. Pure blue sits near 264 here, not 240.

Lightness is the star. It comes from OKLab, a colour space published in 2020 that was built to predict perceived lightness, colourfulness and hue more evenly than older models. Chroma replaces saturation: rather than a percentage of some maximum, it is an absolute amount of colour, so a chroma of 0.1 means the same visual intensity whatever the hue. Hue is still an angle, but the angles are spaced so that a 30 degree step looks like a similar change all the way round.

OKLCH vs HSL: the same lightness, side by side

Take six hues and hold lightness and chroma fixed at oklch(65% 0.11 H). The swatches below look like one family, and their contrast against white stays between 3.1:1 and 3.4:1. Do the same in HSL at 50% lightness and contrast against white swings from about 1.07:1 for yellow to 8.6:1 for blue.

oklch(65% 0.11 H) at six hues. Equal lightness, equal chroma, and they genuinely look it.

That evenness is what makes OKLCH useful for real work. A set of status colours, chart series or category tags can share one L and C and differ only in hue, and none of them shouts louder than the others. If you then need a colour blind safe set, you vary L as well, which is covered in colour blind friendly palettes.

How to write OKLCH in CSS

css
:root {
  /* lightness as a percentage or a number */
  --violet: oklch(60% 0.2 293);
  --violet-same: oklch(0.6 0.2 293);

  /* with transparency */
  --violet-soft: oklch(60% 0.2 293 / 0.4);

  /* grey: chroma 0, hue ignored */
  --grey: oklch(60% 0 0);
}

/* a fallback for very old browsers comes first */
.button {
  background: #8860ea;
  background: oklch(60% 0.2 293);
}
oklch(60% 0.2 293) is close to #8860ea in sRGB. Current versions of Chrome, Edge, Firefox and Safari all support oklch().

Browser support is broad, and you can confirm the detail on caniuse. To explore values visually, oklch.com is a picker that shows which combinations a normal screen can display. To convert an existing brand hex, paste it into that picker or into your browser devtools colour panel, which can display any colour in OKLCH.

Building a scale with OKLCH

To make a tint and shade scale, step lightness evenly and let chroma rise towards the middle and fall towards the ends. Very light and very dark colours physically cannot hold much colour, so if you keep chroma high at the extremes the browser has to clip them. Here is a violet scale built that way.

Hue 293 throughout. Each step is a similar visual jump, which HSL scales rarely manage.

Because L tracks perceived lightness, you can make rough contrast decisions from the numbers alone. In this scale, white text passes 4.5:1 from L 50 downwards, and black text passes from L 60 upwards. Always confirm with a contrast checker, but you will rarely be surprised. Turning a scale like this into named tokens is covered in design tokens.

Gamut: when a colour does not exist on screen

OKLCH can describe colours no screen can show. Most monitors display sRGB; many recent phones and laptops display the wider Display P3. Push chroma high enough and you leave both. When that happens the browser maps the colour back to the nearest one the display can show, so nothing breaks, but you may not get what you typed.

Avoid

  • High chroma at very light or very dark L
  • Copying P3 values into a brand guide meant for print
  • Assuming a vivid OKLCH colour looks the same on every screen
  • Using chroma above about 0.2 for large background areas

Do

  • Check values in a picker that marks the sRGB edge
  • Keep a hex fallback for brand colours
  • Lower chroma towards the ends of a scale
  • Save the most vivid colours for small accents

OKLCH gradients

Gradients are where perceptual colour pays off most visibly. A plain CSS gradient blends in sRGB, which dips into grey between distant hues. Modern CSS lets you choose the space to blend in, and OKLab or OKLCH keeps the middle bright and clean.

The same two colours three ways. OKLCH travels round the hue wheel, so it can pass through hues neither end contains.

OKLab blends in a straight line and suits most two colour gradients. OKLCH rotates hue, which is lovely for sunsets and rainbows but can surprise you. The full technique, including the shorter hue and longer hue keywords, is in CSS gradients in OKLCH, and the theory behind it in gradient interpolation.

Gradiently's Marks are rendered live rather than written as CSS, and each carries its own palette: auto ink picks light or dark type from that palette for every line, so the words read without you checking numbers. If you would rather start from a finished living background than a value in a picker, browse the Market by colour words.

Find a gradient that’s only yours

Browse thousands of Marks, design with any of them for free, and claim the one that feels like you.

Browse the Market

Questions people ask

What is OKLCH?

OKLCH is a colour format based on the OKLab colour space. It describes colours by perceptual lightness, chroma and hue, so equal values look equally light and vivid.

Is OKLCH better than HSL?

For building palettes, scales and gradients, yes, because its lightness matches what eyes see. HSL is still fine for quick hand edits.

Can I use oklch() in CSS today?

Yes. Current versions of Chrome, Edge, Firefox and Safari support it. Put a hex fallback first if you must support very old browsers.

What is the maximum chroma in OKLCH?

There is no fixed maximum. The possible chroma depends on lightness, hue and the display; in sRGB most hues top out well below 0.37.

How do I convert hex to OKLCH?

Paste the hex into an OKLCH picker such as oklch.com, or into your browser devtools colour panel, which can show the same colour in OKLCH.

Share this guide

Written by GradientlyVerified Gradiently account

The team behind Gradiently, a design tool built around Marks: living gradients that make everything you design look like yours.

See our profile

On this page

Lightness, chroma and hueOKLCH vs HSL: the same lightness, side by sideHow to write OKLCH in CSSBuilding a scale with OKLCHGamut: when a colour does not exist on screenOKLCH gradients

Share this guide

Next in Colour

Color blind friendly palettes and how to test your designs

Keep reading

All Colour guides
CSS and web

CSS gradient OKLCH interpolation for smoother blends

5 min read

Most dull, grey-middled gradients are not a colour problem but a maths problem. Two words, in oklch, change where the browser does the maths.

Colour

HSL color: the friendliest way to write colours in CSS

5 min read

Hex tells the browser what to paint. HSL tells you what the colour is: which hue, how vivid, how light. That makes it the easiest format to edit by hand.

Gradients

Gradient interpolation: sRGB, OKLab and why it matters

5 min read

Pick blue and yellow, blend them, and the middle turns grey. That is not your colours failing. It is the maths of the colour space doing the blending, and since CSS Color 4 you can change it.

Find the look that’s only yours.

Every Mark is a living background with one owner. Try an unclaimed Mark, and claim yours when it feels right.

Start designing

Check a certificate

Type a certificate number or a Mark’s code to see who owns it.

Works with ChatGPT and Claude

Ask your AI for a design. It makes it in your Mark, ready to edit.

ChatGPTClaude
How to connect

Product

  • Market
  • Explore
  • Pricing
  • Certificates

Learn

  • Field Guide
  • Help centre
  • What’s new

Developers

  • Overview
  • ChatGPT and Claude
  • API reference
  • API keys

Company

  • About
  • Contact us
  • Sign in

Legal

  • Terms
  • Privacy
  • Refunds
  • Mark protection
  • Cookies
  • All policies
Move through the letters. Each one wears a real Mark.Touch a letter to see its Mark.One name. Ten Marks inside it.
© 2026 Gradiently