OKLCH Converter

Convert hex to OKLCH and OKLCH back to hex — paste any format, get all four back.

A free online color converter that works in every direction: paste a hex, rgb(), hsl(), or oklch() value and get the other three back instantly. If an OKLCH color falls outside what sRGB screens can display, the hex, RGB, and HSL outputs are clamped to the nearest displayable color and flagged. Runs entirely in your browser — no signup, nothing uploaded.

Examples:

This OKLCH color is outside the sRGB gamut — the hex, RGB, and HSL values below are clamped to the closest color your screen can actually display.

Accepted input formats

#3b82f6
Hex (3, 6, or 8 digits)
rgb(59 130 246)
RGB
hsl(217 91% 60%)
HSL
oklch(62% 0.19 260)
OKLCH (L C H)

Frequently asked questions

Yes. Converting between hex, rgb(), hsl(), and oklch() is completely free with no signup. The conversion runs entirely in your browser — your colors are never uploaded anywhere.
Paste any hex color (like #3b82f6) into the input above. The tool auto-detects the format and instantly shows the equivalent rgb(), hsl(), and oklch() values, each with its own copy button.
Yes. Paste a hex value and the rgb() output appears instantly alongside hsl() and oklch() — or paste an rgb() value to get hex back. You don't need to pick a mode; the tool auto-detects whichever format you paste and always shows all four.
OKLCH is a perceptually-uniform color space — equal changes in its lightness (L), chroma (C), and hue (H) values produce visually equal changes in the color, unlike HSL where the same lightness value can look very different across hues. It's part of the CSS Color 4 spec, supported in all modern browsers, and can express colors outside the traditional sRGB gamut on wide-gamut (P3) displays.
OKLCH can represent a wider range of colors than hex, rgb(), or hsl() can display — those formats are limited to the sRGB gamut. If you type or generate an OKLCH value with very high chroma, it may fall outside what sRGB can show. This tool detects that and reduces only the chroma, step by step, until the color fits — lightness and hue stay exactly as you typed them. The hex, rgb(), and hsl() outputs are therefore a close approximation, not an exact match, and an amber notice tells you when that has happened. Your original OKLCH value is still shown as typed, and converting the other way (hex, rgb(), or hsl() into OKLCH) is always exact.
Yes. Input colors with an alpha channel — 8-digit hex, rgba(), hsla(), or oklch(... / a%) — are parsed correctly and the alpha value carries through to every output format.
Both describe a color as lightness, a color intensity value, and a hue, but HSL's lightness is not perceptually accurate — a 50% lightness blue and a 50% lightness yellow can look very different in actual brightness. OKLCH's lightness is calibrated to human perception, so palettes built in OKLCH look more visually consistent, which is why it's increasingly used for design-system color scales.
Yes — paste an oklch(...) value into the input and the hex, rgb(), and hsl() fields update immediately. If the OKLCH value is outside the sRGB gamut, the hex/rgb/hsl outputs show the nearest displayable color and a badge indicates clamping occurred.
No. All parsing and conversion happens locally in your browser using JavaScript — nothing is sent to a server, logged, or stored.