Skip to content
hexcolorcodepicker.com

HEX to OKLCH Converter

OKLCH (computed live)

oklch(0.62 0.19 260°)

RGB: rgb(59, 130, 246) · HSL: hsl(217, 91%, 60%)

  • Lightness

    0.62

  • Chroma

    0.19

  • Hue

    260°

OKLCH values here are computed live by the tool. Hue anchors: red ≈29°, yellow ≈110°, green ≈143°, cyan ≈195°, blue ≈264°, magenta ≈328° — the OKLCH wheel, not the HSL wheel.

Convert HEX to OKLCH free. Type a HEX code and get lightness, chroma, and hue in the modern perceptual format, with plain-language OKLCH guidance. Try it now.

What is the OKLCH value of this HEX color?

The OKLCH value of a HEX color is its lightness, chroma, and hue in a modern format designed to match how human eyes actually see color. Type a HEX code and the tool answers with three numbers — L for lightness from 0 (black) to 1 (white), C for chroma (how vivid it is), and H for hue in degrees — plus the same color shown as a swatch so you can check it by eye.

OKLCH is the format modern CSS uses when a designer wants predictable, even-looking color steps. It is newer than HSL and harder to compute by hand, which is exactly why this tool exists: the conversion runs in the browser, instantly, for any color you type.

Lightness scale — your color, live

oklch(0.62 0.19 260°)

L 0.62 (0 = black, 1 = white)

OKLCH values here are computed live by the tool.

Why OKLCH exists — HSL lightness lies

OKLCH exists because HSL lightness lies: yellow and blue at 50% lightness do not look equally bright. A yellow at hsl(60, 100%, 50%) looks bright and light, while a blue at hsl(240, 100%, 50%) looks dark and heavy — yet HSL calls both 50% lightness. Any palette built by stepping HSL lightness looks uneven, with yellows jumping out and blues sinking.

OKLCH fixes this by building lightness from how eyes actually perceive brightness. Two colors with the same OKLCH lightness look equally bright, whatever their hue. That single property is why designers now build color scales in OKLCH instead of HSL.

The same-lightness lie, shown side by side

Yellow

HSL lightness 50%

Blue

HSL lightness 50%

Yellow

OKLCH lightness 0.6

Blue

OKLCH lightness 0.6

Top row: same HSL lightness, very different brightness. Bottom row: same OKLCH lightness, evenly bright.

What do L, C, and H each mean?

L is lightness from 0 to 1, C is chroma (how vivid the color is), and H is hue in degrees around the color wheel. L 0 is black and L 1 is white, and equal steps in L look like equal steps in brightness — unlike HSL, where a 10-point step looks bigger in some hues than others. C 0 is gray, and higher C is more vivid.

H is hue in degrees around the OKLCH wheel: about 29° is red, 110° is yellow, 143° is green, 195° is cyan, 264° is blue, and 328° is magenta. The OKLCH wheel is rotated from the HSL wheel, so the same color sits at a different angle. Changing H alone spins the color around the wheel without changing how light or vivid it is, which makes OKLCH ideal for building palettes.

OKLCH explorer — your color, live

Lightness (L)0.62

Chroma (C)0.19

Hue (H)260°

OKLCH hue anchors: red ≈29°, yellow ≈110°, green ≈143°, cyan ≈195°, blue ≈264°, magenta ≈328°.

How to use OKLCH in CSS

Use OKLCH in CSS by writing oklch() with lightness, chroma, and hue, like color: oklch(L C H); where L, C, and H are the tool's live values. Modern browsers support it directly, and it is part of CSS Color Level 4. The tool's Copy button gives you the exact line to paste into a stylesheet or a CSS variable.

OKLCH shines in design systems: a whole button scale can be built by keeping C and H fixed and stepping L by 0.1 at a time, and every step will look evenly spaced. The same trick in HSL produces steps that look lumpy and uneven across hues.

CSS snippet — your color, live

color: oklch(0.62 0.19 260°);

One color, five lightness steps (same C and H)

—————

Every step looks evenly spaced — that is the point of OKLCH.

OKLCH vs HSL — which should you use?

Use OKLCH when even-looking color steps matter, and HSL when you need the widest browser support or a quick adjustment. OKLCH wins for palettes, scales, and gradients, because its lightness is honest and its steps are even. HSL wins for simple jobs and older browsers, because every browser has supported it for years.

In practice, many teams now design in OKLCH and ship HEX: they pick colors with OKLCH's even steps, then copy the HEX code into the stylesheet. This tool supports that workflow by showing both forms for the same color, side by side.

Which row looks evenly spaced? — your color

OKLCH lightness steps

HSL lightness steps

The OKLCH row steps evenly; the HSL row jumps. Both rows are built live from your color.

Colors OKLCH cannot show on screen

Some OKLCH colors fall outside the screen's color range and cannot be displayed exactly, so the tool clamps them to the nearest color your screen can show. Highly vivid colors — a very saturated cyan or green at mid lightness — can have a chroma your monitor cannot reproduce. The tool shows the closest displayable color and labels it as clamped, rather than silently showing the wrong color.

This is not a bug in OKLCH; it is a fact about screens. The sRGB range all normal monitors share is smaller than the range OKLCH can describe, and newer wide-gamut screens (Display P3) can show more of it. The clamped value is still the best available match on your screen.

Gamut check — your color, live

Inside the screen range.
Your color displays exactly as computed.

Try a very vivid color in the tool above — the L, C, and H sliders can push chroma past what sRGB can show.

A note on the numbers in this spec — what is not claimed here

This spec gives no worked OKLCH triple for any color, because a full L/C/H conversion cannot be checked reliably by hand and inventing one would be worse than omitting it. The conversion runs through a multi-step matrix calculation that is easy to get wrong with pencil and paper. The one exception is the six hue angles for the sRGB primaries in §3, computed from the standard OKLab matrix and cross-checked against the published value for #3B82F6.

Instead, this page is designed so the tool itself is the source of truth for any single color: the live converter computes the values, the sliders edit them, and the CSS snippet copies them. The claims this page does make — the 0–1 lightness range, the hue angles in §3, the yellow-vs-blue HSL comparison — are computed or stated in words, never invented.

Tool-is-truth panel

OKLCH values here are computed live by the tool.

oklch(0.62 0.19 260°)

Live result for #3B82F6 — the page's only OKLCH numbers.

All color tools

21 tools, one topic — see About Hex Color Code Picker for who built this site.

Frequently asked questions

Type the HEX code into the tool and read off lightness, chroma, and hue. The tool computes the conversion live — OKLCH math is too involved to do reliably by hand, so there is no hand-worked example on this page and no invented numbers.