HEX to OKLCH Color Converter

Convert HEX to OKLCH instantly — free, in your browser.

Processed locally — files never leave your device

Type a HEX code like #FF0000 or #F00, or use the color picker. The result updates as you type.

Works offline once loaded Uploaded: 0 bytes

OKLCH describes a color by lightness (L, 0 to 1), chroma (C, how colorful it is) and hue (H, the angle on the color wheel). This free converter gives you the exact HEX to OKLCH values instantly, with a live swatch so you can see the color as you type — no tables to look up, no guessing.

It runs entirely in your browser, so nothing is uploaded and it works offline once the page loads. Designers use it to translate brand colors between tools: copy a HEX from a style guide, get the RGB for CSS, the HSL for a color picker, or the CMYK for print. For image work, pair it with the Image Compressor or the Background Remover.

How to use

  1. Type or paste your HEX color value into the box above — or pick a color with the color picker.
  2. The result updates live, with a swatch showing the exact color.
  3. Check the breakdown: every channel is shown separately.
  4. Press Copy to copy the converted value for your CSS, design tool or print file.

Why use Toolsvine

OKLCH is the modern color model for the web: it is perceptually uniform, so the numbers match what your eyes actually see — unlike HSL, where a yellow at 50% lightness looks far brighter than a blue at 50%. The conversion needs matrix math no one does by hand. A converter that runs locally, shows the swatch live and copies the answer in one click turns a chore into a second — free, with no account and no upload.

How does the HEX to OKLCH conversion work?

OKLCH is built on the OKLab color space, which is designed so that equal steps in its numbers look like equal steps to the human eye. The conversion goes HEX → linear RGB → OKLab (L, a, b) → OKLCH: L is lightness from 0 to 1, C is chroma, and H is the hue angle.

Chroma runs from 0 for gray up to about 0.37 for the most vivid colors a screen can show. Hue works like the HSL wheel: 0° is red, 120° is green, 240° is blue, and the numbers in between are the colors you would expect. There is no short pencil-and-paper formula — the matrix math is done for you by the culori library in your browser.

Worked example: violet #7C3AED

Violet #7C3AED is oklch(0.541, 0.247, 293.01°): lightness 0.541, chroma 0.247 and hue 293.01°, a violet leaning toward blue. Notice that the lightness is only 0.541 even though the color looks vivid — OKLCH knows violet is genuinely darker to human eyes than a yellow with the same HSL lightness. That honesty is the whole point of the model.

HEX to OKLCH worked example showing violet hex code 7C3AED converted to oklch 0.541 0.247 293 degrees
#7C3AED converts to oklch(0.541, 0.247, 293.01°).

Common colors

ColorValue
Red #FF0000oklch(0.628, 0.258, 29.23°)
Green #00FF00oklch(0.866, 0.295, 142.5°)
Blue #0000FFoklch(0.452, 0.313, 264.1°)
White #FFFFFFoklch(1, 0, 0°)
Black #000000oklch(0, 0, 0°)

Values are rounded for display: RGB channels are whole numbers from 0 to 255, HSL and HSV use degrees and percentages, and OKLCH lightness runs from 0 to 1. The converter itself keeps full precision and only rounds what it shows you.

Why is OKLCH better than HSL?

OKLCH is perceptually uniform: a lightness of 0.6 looks equally bright whether the hue is yellow, green or blue, and changing the hue never changes the apparent brightness. In HSL, the same lightness number can look wildly different across hues, and sliding the hue often makes a color jump brighter or darker.

For gradients, palettes and accessible text, OKLCH behaves the way your eyes expect. Modern browsers accept oklch() in CSS, so you can paste the result straight into a stylesheet. For the classic hue-based view of the same color, the HEX to HSL Color Converter gives you the HSL numbers.

Frequently asked questions

How do I convert HEX to OKLCH?

Type the value in the box above — the result appears instantly, with a swatch showing the exact color. Press Copy to use it in your CSS or design file. The converter accepts six-digit codes with or without the # sign, and three-digit shorthand like #F00 expands to #FF0000 automatically.

Is my color data uploaded anywhere?

No. The conversion runs in your browser with JavaScript. Nothing leaves your device, and the page works offline after it loads. Your brand colors and client palettes never leave your computer, which is the whole point of a local converter.

Why do the same colors have different values in different tools?

Every color model describes the same color differently: HEX and RGB store red, green and blue amounts; HSL stores hue, saturation and lightness; CMYK stores ink. They are translations, not different colors. The swatch never changes — only the numbers that describe it do.

What do L, C and H mean in OKLCH?

L is lightness from 0 (black) to 1 (white), C is chroma — how colorful the color is, from 0 for gray to about 0.37 for the most vivid colors — and H is the hue angle in degrees, like the HSL wheel. A gray has C = 0 and no meaningful hue, while a vivid red sits near L = 0.63, C = 0.26 and H = 29°.

Can I use the result in CSS?

Yes — copy the value straight into your stylesheet. Modern browsers accept rgb(), hsl() and oklch() directly, and HEX works everywhere. OKLCH is the best choice for gradients and palettes, because stepping the lightness never changes the apparent brightness the way HSL does.