Convert HEX to OKLCH

Paste a HEX color to get its OKLCH value — and every other format — with a live swatch. All in your browser.

HEX to OKLCH, explained

A HEX code writes the red, green and blue channels as a six-digit hexadecimal number prefixed with #, the format most design tools and stylesheets use.

OKLCH is a modern, perceptually-uniform space describing lightness (%), chroma and hue (°), great for accessible palettes and smooth gradients.

Worked example

#f59e0b converts to oklch(76.86% 0.1647 70.08). The converter above is pre-filled with this color — edit it or pick your own to see the result update live.

HEX to OKLCH reference table

ColorHEXOKLCH
Amber #f59e0b oklch(76.86% 0.1647 70.08)
Navy #0a1828 oklch(20.56% 0.0376 252.93)
Red #dc2626 oklch(57.71% 0.2152 27.33)
Green #16a34a oklch(62.71% 0.1699 149.21)
Sky #0ea5e9 oklch(68.47% 0.1479 237.32)

Common uses

Converting a HEX brand colour to OKLCH lets you build perceptually-even tints, shades and accessible palettes in modern CSS.

Related conversions

Need another format? The full color converter reads HEX, RGB, HSL, OKLCH and CSS named colors and shows them all at once.

Frequently asked questions

How do I convert HEX to OKLCH?

Paste your HEX value into the converter above and it shows the OKLCH equivalent — along with every other format — instantly. For example, #f59e0b becomes oklch(76.86% 0.1647 70.08).

What is HEX #f59e0b in OKLCH?

#f59e0b in OKLCH is oklch(76.86% 0.1647 70.08).

Is my color sent to a server?

No. Every conversion runs locally in your browser using the canvas color parser and standard color math, so nothing you enter is uploaded.