OKLCH to Hex Converter
Convert CSS OKLCH values back to sRGB HEX cleanly using perceptual OKLCH chroma clamping so wide-gamut hues do not shift.
How to Use This Tool
- Enter or paste your OKLCH value or choose one of the curated preset swatches.
- Copy the formatted HEX value directly, or inspect the secondary HEX, RGB, HSL, and OKLCH chips below.
- Click into Tailwind Scale Generator or Contrast Checker to validate accessibility on the converted shade.
Key Features
- Bidirectional parsing supporting CSS Color Level 4 syntax cleanly
- High-chroma OKLCH colors often sit in Display-P3 outside sRGB. Naively clamping R/G/B distorts hue; ColorToolkits binary-searches OKLCH Chroma downward until it touches the exact sRGB boundary.
- Instant clipboard feedback with live OKLCH and Display-P3 gamut safety
- Zero server round-trips—every calculation executes immediately in browser memory
Gamut-safe OKLCH to sRGB clamping
High-chroma OKLCH colors often sit in Display-P3 outside sRGB. Naively clamping R/G/B distorts hue; ColorToolkits binary-searches OKLCH Chroma downward until it touches the exact sRGB boundary.
Reference Snippet (CSS Fallback)
.badge {
color: #00ae56; /* gamut-clamped sRGB */
color: oklch(0.65 0.22 150); /* modern P3+ */
}Frequently Asked Questions
Pushing lightness up or down at high chroma pushes the point outside sRGB. Reducing chroma first preserves hue accurately.
More Color Tools
View all tools →Color Converter
Convert single or bulk colors across HEX, RGB, HSL, OKLCH, P3, CMYK, and mobile formats.
Color Picker & Eyedropper
Pick exact colors in HEX, RGB, HSL, or OKLCH and sample pixels directly from your screen.
Tailwind Color Scale
Turn any brand color into a balanced 50–950 Tailwind scale with live contrast checks.
Contrast Checker
Check text and UI contrast against WCAG AA/AAA and APCA standards, with 1-click fixes.