HEX to OKLCH Converter
OKLCH (computed live)
oklch(0.62 0.19 260°)
RGB: · HSL:
Closest color your screen can show — this OKLCH value falls outside the sRGB range and was clamped.
Lightness
Chroma
Hue
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
L (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)
Chroma (C)
Hue (H)
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.
Live result for — the page's only OKLCH numbers.
All color tools
21 tools, one topic — see About Hex Color Code Picker for who built this site.
- Color Picker from ImageUpload an image, click a pixel, and read its HEX code.
- Screen EyedropperSample any pixel on your screen.
- RGB to HEX ConverterTurn three RGB numbers into one HEX code.
- HEX to RGB ConverterTurn a HEX code into three RGB numbers.
- HEX to HSL ConverterTurn a HEX code into hue, saturation, and lightness.
- HSL to HEX ConverterTurn HSL values back into a HEX code.
- HEX to HSV ConverterTurn a HEX code into hue, saturation, and value.
- HEX to CMYK ConverterTurn a HEX code into approximate print values.
- RGB to HSL ConverterTurn RGB numbers into hue, saturation, and lightness.
- HEX to OKLCH ConverterTurn a HEX code into the modern OKLCH format.
- Color ConverterSee one color in every format at once.
- HEX to RGBA ConverterTurn a HEX code into RGB with transparency.
- Color Name to HEXLook up any of the 148 CSS named colors.
- Color Palette GeneratorBuild a five-color palette from one color.
- Shades GeneratorBuild 10 tints and 10 shades from one color.
- Gradient GeneratorBuild a linear or radial gradient and copy the CSS.
- Contrast CheckerCheck any text and background pair for AA and AAA.
- Color MixerMix two colors and see the result.
- Random Color GeneratorPick a random color from all 16,777,216 HEX colors.
- Color Blindness SimulatorSee your colors as color-blind users see them.
- Color ChartThe 148 named colors with HEX, RGB, and HSL.
No tool matches your search.
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.
OKLCH stands for OK Lightness, Chroma, Hue — the cylindrical form of the OKLab color space. The “OK” marks it as the improved successor to the older CIELAB space, designed by Björn Ottosson to be perceptually uniform: equal steps in the numbers look like equal steps to the eye.
OKLCH is better than HSL because its lightness matches what eyes actually see, so equal steps look equal. In HSL, yellow and blue at 50% lightness look very different in brightness; in OKLCH, colors with the same lightness look equally bright. That makes OKLCH better for palettes, scales, and gradients.
Yes — modern browsers support oklch() directly as part of CSS Color Level 4. Chrome, Edge, Safari, and Firefox all support it in current versions. For older browsers, provide a HEX fallback line before the OKLCH line so the page still shows a color.
Chroma is how vivid a color is: 0 is gray, and higher numbers are more saturated. Most screen colors fall between 0 and about 0.37 chroma. A chroma above that usually falls outside the screen’s color range and gets clamped to the nearest displayable color.
Because OKLCH values cannot be verified by hand with confidence, and this site does not publish numbers it cannot verify. The live tool computes the values for any color you type, and those live values — not a hand-written example — are the numbers to trust.