Convert Hex to OKLCH CSS
Transform legacy Hex colors into perceptually uniform W3C oklch() strings with live gamut verification — 100% locally in your browser.
CSS Color 4
- 100% browser-local
- Zero server transfers
- CSS Color 4 precision
or drop a color string, CSS/JSON snippet, or file here · Ctrl V to paste · Paste Hex, RGB, HSL, OKLCH or use Screen Eyedropper
Instant Before & After Specimen
Perceptual OKLCH + P3 Check#2563EBoklch(0.5462 0.2152 262.88)| Property | Source: HEX | Target: OKLCH |
|---|---|---|
| Gamut scope | sRGB (Standard Web) | Wide Gamut (P3 / Unbounded) |
| Perceptual uniformity | No | Yes |
| Alpha channel support | Yes | Yes |
| Human readability | Medium | High |
| Extension / Token | .css / .txt | .css / .json |
| Best for | Compact copy-paste handoff in sRGB brand guidelines and legacy CSS | Perceptually uniform UI palettes, Tailwind v4 design tokens, and wide-gamut CSS |
How to use Hex to OKLCH
Hex to OKLCH — cleanly inside your local browser with zero server transfers.
- Enter or pick a colorType Hex, RGB, HSL, OKLCH, or Lab — or click Screen Eyedropper and live sliders.
- Inspect math & gamutReview exact CSS Color 4 readouts, sRGB vs Display P3 status, and profile options.
- Copy, chain, or exportCopy ready CSS/JSON snippets, download binary swatch files, or pipe directly to related Colr tools.
Frequently asked questions
Does converting Hex to OKLCH change how the color renders on sRGB screens?
No. The converted oklch() coordinate points to the exact same D65 sRGB color until you intentionally raise Chroma toward Display P3.
What decimal precision should I keep for Tailwind v4 or CSS tokens?
Three decimal places on Lightness and Chroma (plus 1 decimal on Hue) keeps round-trip error below 0.1 sRGB channel steps.