Skip to content

Menu

OKLCH Color Picker

Free OKLCH color picker. Set lightness, chroma and hue, get hex, rgb, hsl, oklab and Display P3, and see if the colour fits sRGB or P3.

Runs entirely in your browserDesignFree, no sign-up
Loading tool

01What is OKLCH Color Picker?

OKLCH Color Picker helps you build colours in OKLCH, the CSS colour space where equal steps in lightness look roughly equal to the eye. That makes it easier to plan tints, shades and theme tokens than with hex or HSL. You build a colour with three sliders: lightness from 0 to 1, chroma from 0 to 0.4, and hue in degrees. An alpha slider sets transparency. You can also type a hex colour, in three or six digits, and convert it into OKLCH as a starting point. As you move the sliders, the tool shows the colour as oklch(), oklab(), hex, rgb(), hsl() and color(display-p3 ...), each with a copy button. The maths follows the conversion sample code in CSS Color Module Level 4, using the OKLab matrices and the D65 white point. The steps are simple: hue and chroma become the a and b axes of OKLab, OKLab becomes XYZ, and XYZ becomes sRGB or Display P3. Two badges show whether the colour is inside the sRGB gamut and inside the Display P3 gamut. Many OKLCH values with high chroma cannot be shown on an sRGB screen at all. When that happens, the hex, rgb and hsl values are gamut-mapped with the CSS Color 4 algorithm. It searches for a lower chroma while keeping lightness and hue, and stops once the clipped result is within a small colour difference. That gives a closer match than simply clipping each channel. If the colour is also outside Display P3, the P3 value is clipped, so treat it as approximate. Here is a worked example. Set lightness to 0.7, chroma to 0.25 and hue to 150. The tool shows oklch(70% 0.25 150), marks it outside sRGB but inside Display P3, and gives color(display-p3 0.161 0.7599 0.3015). The sRGB fallback is rgb(0 194 72), or #00c248. The CSS box then writes the rgb() line first and the oklch() line after it, so older browsers keep the fallback. Two swatches sit side by side: the sRGB fallback and the raw oklch() value as your own browser and screen render it. On an sRGB monitor they may look the same even when the colour is out of gamut. When the colour fits sRGB, the CSS box gives only the oklch() declaration. Values are rounded for display, so a hex converted in and back out can differ by one step in rare cases. It does not check contrast, build palettes, or support other spaces such as Rec. 2020. Everything runs in your browser.

Front-end developers and designers moving colour tokens to OKLCH or checking wide-gamut colours. The tool runs entirely in your browser, so your data never leaves your device.

02How to use OKLCH Color Picker

  1. Move the Lightness, Chroma and Hue sliders, or type exact numbers in the boxes beside them
  2. Or type a hex colour under Start from a hex colour and press Convert
  3. Check the sRGB and Display P3 badges to see whether the colour fits each gamut
  4. Copy any output value, or copy the CSS block with its fallback

03Worked examples

Input: oklch(62.31% 0.188 259.81)
Result: hex #3b82f6, rgb(59 130 246), hsl(217.2 91.2% 59.8%), oklab(62.31% -0.0333 -0.185). Inside sRGB and Display P3.
A familiar blue that fits in both gamuts, so the CSS output is a single oklch() line.
Input: oklch(65% 0.28 29)
Result: Outside sRGB, inside Display P3. Gamut-mapped fallback rgb(255 17 15), hex #ff110f; P3 color(display-p3 0.9774 0.1611 0.1107).
A red that only wide-gamut screens can show. The CSS output includes the rgb() fallback line.
Input: oklch(70% 0.4 150)
Result: Outside sRGB and Display P3. Gamut-mapped fallback rgb(0 194 72), hex #00c248; P3 clipped to color(display-p3 0 0.8201 0).
Chroma 0.4 is beyond both gamuts. The hex and rgb values are the gamut-mapped fallback, not the exact colour.
Input: oklch(50% 0 0)
Result: hex #636363, rgb(99 99 99), hsl(0 0% 38.8%), oklab(50% 0 0). Inside sRGB and Display P3.
With chroma at 0 the hue does nothing and the result is a neutral gray. 50% OKLCH lightness is darker than 50% HSL lightness.
Input: oklch(30% 0.12 300)
Result: hex #38185f, rgb(56 24 95), hsl(267 59.7% 23.3%), oklab(30% 0.06 -0.1039). Inside sRGB and Display P3.
A dark purple that stays in sRGB at this lightness.
Input: oklch(62.31% 0.188 259.81) with alpha 0.5
Result: oklch(62.31% 0.188 259.81 / 0.5), hex #3b82f680, rgb(59 130 246 / 0.5)
Lowering the alpha slider adds / 0.5 to every format and an 80 alpha byte to the hex. Output trimmed to three formats.

04Common use cases

  • Converting a brand hex colour into OKLCH for a design token file
  • Finding the highest chroma a hue can reach before it leaves sRGB
  • Writing oklch() colours with an sRGB fallback for older browsers
  • Checking whether a vivid colour needs a Display P3 screen to look right
  • Making lighter and darker variants by changing only lightness

05Tips

  • High chroma values often fall outside sRGB, and the limit depends on hue and lightness, so watch the sRGB badge as you raise chroma
  • Keep the same lightness and change only hue to get colours that feel similarly bright
  • When a colour is outside sRGB, screens that cannot show it will display something close to the fallback swatch
  • The Display P3 output is clipped when the colour is outside P3, so do not treat it as exact in that case

06Related concepts

OKLCH, OKLab, Display P3, sRGB gamut, Gamut mapping, CSS Color Module Level 4.

Frequently Asked Questions

What is OKLCH Color Picker?

OKLCH Color Picker is a free, browser-based developer tool on AIDToolStack. Free OKLCH color picker. Set lightness, chroma and hue, get hex, rgb, hsl, oklab and Display P3, and see if the colour fits sRGB or P3. It requires no installation or sign-up and works entirely in your browser.

Is OKLCH Color Picker free to use?

Yes. No sign-up, no fees and no usage cap.

Does OKLCH Color Picker store my data?

No. It runs in your browser; nothing is uploaded.

Cheat sheet

Related Tools

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…

What changed in AI dev tools, once a month

Renames, shutdowns, pricing changes and new MCP setups, each with a source.

Subscribe