Skip to content
Aback Tools Logo

OKLCH Color Converter

Convert OKLCH (Lightness, Chroma, Hue) to HEX, RGB, HSL, and OKLab values with real-time sliders and gamut detection. Built with Björn Ottosson's perceptually uniform OKLab model, the OKLCH converter provides accurate, instantaneous conversion for the modern CSS Color Level 4 colour space. Features out-of-sRGB-gamut warnings with closest in-gamut suggestions. Fully private, 100% free, and no signup required.

OKLCH Color Converter
Convert OKLCH (Lightness, Chroma, Hue) to HEX, RGB, HSL, and OKLab - the modern CSS Color Level 4 color space. Built with Björn Ottosson's perceptually uniform OKLab model. Gamut warnings for out-of-sRGB-range colors.

Sample Colors

OKLCH Values

°
#00A9B3

Out of sRGB Gamut

This OKLCH color is outside the sRGB color space and cannot be displayed accurately on standard monitors. Chroma reduced by 26% to fit sRGB

Closest in-gamut:
#00A3AA
L: 0.65 C: 0.15 H: 200°

Converted Values

HEX#00A9B3
HEX (alpha)#00A9B3FF
RGBrgb(0, 169, 179)
HSLhsl(183, 100%, 35%)
OKLaboklab(0.65 -0.141 -0.0513)
OKLCH CSSoklch(0.65 0.15 200)
HEX#00A9B3
RGBrgb(0, 169, 179)
HSLhsl(183, 100%, 35%)
OKLaboklab(0.65 -0.141 -0.0513)
OKLab (raw)L: 0.65, a: -0.141, b: -0.0513
GamutOut of sRGB

Why Use Our OKLCH Color Converter?

Instant OKLCH Conversion

The OKLCH converter updates all output formats on every slider movement - no button to press. Adjust Lightness, Chroma, and Hue and instantly get HEX, RGB, HSL, and OKLab values. The real-time colour swatch shows exactly how the OKLCH colour will appear on screen.

Perceptually Uniform Colour Space

OKLCH is a perceptually uniform colour space - equal numerical steps correspond to equal perceived colour differences, unlike HSL or RGB. The OKLCH converter makes it easy to work with this modern CSS Color Level 4 format for better gradients, colour scales, and accessible colour choices.

100% Private - No Upload

All conversion happens locally in your browser using pure JavaScript. Your colour values never leave your device and are never sent to any server - safe for client projects and proprietary design systems.

Free & No Limits

Convert unlimited OKLCH colours with no signup, no subscription, and no usage caps. The OKLCH converter is completely free forever with no ads blocking the interface. Includes gamut detection and closest in-gamut suggestions.

Common Use Cases for OKLCH Color Converter

Modern CSS Development

Frontend developers use the OKLCH converter to author and verify colours in modern CSS. With oklch() now supported in all major browsers, the OKLCH converter helps you write cleaner, more maintainable colour code using the perceptually uniform colour space.

Smooth Gradient Creation

OKLCH produces significantly smoother and more visually accurate gradients than sRGB or HSL. Use the OKLCH converter to find the right lightness, chroma, and hue values for gradient stops that transition naturally without muddy midpoints.

Accessible Color Scales

Accessibility specialists use the OKLCH converter because its perceptual uniformity makes it ideal for generating accessible colour scales. Equal steps in OKLCH lightness correspond to equal perceived contrast steps, making WCAG-compliant colour ramps much easier to create.

Design System Color Tokens

Design system engineers use the OKLCH converter to define colour tokens in a perceptually meaningful way. The OKLCH colour space makes it easy to create systematic colour scales where each step has a consistent visual weight across all hues.

Color Science & Research

Researchers and colour scientists use the OKLCH converter to explore the OKLab/OKLCH colour space. The tool provides raw OKLab values alongside the standard output formats, making it useful for understanding colour space mathematics and perceptual models.

Legacy to Modern CSS Migration

When migrating legacy hex or rgb() colour systems to modern oklch(), use the OKLCH converter to understand what the equivalent OKLCH values are. This helps you build intuition for the new colour space while gradually adopting CSS Color Level 4 syntax.

Understanding OKLCH Color Conversion

What is OKLCH Color Space?

OKLCH (Lightness-Chroma-Hue) is a modern colour space introduced by Björn Ottosson in 2020. It is part of CSS Color Level 4 and is designed to be perceptually uniform - meaning that equal numerical changes in OKLCH values produce equal perceived colour differences. This is a significant improvement over older colour spaces like HSL and sRGB, which are not perceptually uniform and can produce inconsistent visual results when interpolating colours.

The OKLCH converter supports the full OKLCH pipeline: it converts between OKLCH, OKLab (the underlying rectangular coordinate space), linear sRGB, and standard sRGB formats including HEX, RGB, and HSL. All conversions use Ottosson's exact matrix mathematics with no approximations.

How Our OKLCH Converter Works

  1. Adjust the OKLCH sliders: Set Lightness (L: 0-1), Chroma (C: 0-0.4+), and Hue (H: 0-360°) using the interactive sliders or numeric inputs. You can also click any sample colour chip to instantly load a preset OKLCH value. Alpha transparency is supported for semi-transparent colours.
  2. Conversion runs in real time: As you adjust any slider, the OKLCH value is converted through OKLab to linear sRGB and then to HEX, RGB, and HSL formats. All values update instantly with no button to press. The colour swatch shows a visual preview of the converted colour.
  3. Gamut check performed automatically: The OKLCH converter automatically detects if the colour falls outside the sRGB gamut. If it does, a warning is displayed along with the closest in-gamut colour achieved by reducing chroma while keeping lightness and hue constant.
  4. Copy any value:Click the Copy button next to any output row or format card to copy that specific value, or use “Copy All Values” to copy the complete colour data including the raw OKLab components.

OKLCH Components Explained

  • Lightness (L): Ranges from 0 (black) to 1 (white). Unlike HSL lightness, OKLCH lightness closely matches human perception. A lightness of 0.5 looks visually halfway between black and white, regardless of the hue or chroma.
  • Chroma (C): Controls colour intensity or saturation. Most sRGB colours have chroma values between 0 and 0.25, though some deep purples and cyans can reach up to 0.3. Values above 0.3 are increasingly likely to be outside the sRGB gamut. The theoretical maximum for OKLCH chroma is unbounded.
  • Hue (H): The colour angle from 0-360 degrees, matching the same hue angles as OKLab. 0° = red/pink, 90° = yellow, 180° = green, 270° = blue. OKLCH hues are perceptually uniform - equal angular steps produce equal perceived hue differences.
  • Alpha (A): Controls transparency from 0 (fully transparent) to 1 (fully opaque). The alpha value is passed through the conversion pipeline to all output formats, so you can use the resulting colour in any CSS context that requires transparency.

OKLCH vs Other Color Spaces

OKLCH vs HSL: HSL is not perceptually uniform - two colours with the same HSL lightness can look dramatically different in brightness (e.g., yellow at L=50% looks much brighter than blue at L=50%). OKLCH fixes this fundamental issue. HSL also produces muddy midpoints when interpolating between two colours, while OKLCH gradients maintain consistent saturation and visual quality.

OKLCH vs LCH: LCH (CIE L*a*b* based) has been available in CSS for longer but has a significant flaw - it can produce invalid colours when measuring hue linearity. OKLCH was specifically designed to be more robust and to better represent how the human visual system perceives colour. Both are supported in modern CSS, but OKLCH is the recommended choice for new projects.

OKLCH vs sRGB: sRGB is the standard colour space for web content but is device-dependent and not perceptually uniform. OKLCH is a device-independent colour space that can represent colours outside the sRGB gamut (wide-gamut displays). The OKLCH converter helps you understand when your colours exceed sRGB and shows you the closest in-gamut alternative.

Frequently Asked Questions About OKLCH Color Converter

An OKLCH color converter transforms colours between the modern OKLCH (Lightness-Chroma-Hue) colour space and standard web formats like HEX, RGB, and HSL. OKLCH is part of CSS Color Level 4 and was created by Björn Ottosson to be perceptually uniform - meaning equal numerical changes produce equal perceived colour differences. Unlike HSL or sRGB, OKLCH accurately represents how the human eye actually perceives colour.

OKLCH is perceptually uniform, which means gradients and colour scales created in OKLCH look smooth and consistent to the human eye. HSL and sRGB produce non-uniform results - for example, yellow at the same HSL lightness as blue looks far brighter. OKLCH eliminates this issue, making it the best choice for creating accessible colour scales, smooth gradients, and systematic design tokens.

L stands for Lightness (0-1), controlling how light or dark the colour appears. C stands for Chroma (0-0.4+), controlling colour intensity or saturation. H stands for Hue (0-360°), the colour angle on the colour wheel. Together, these three values describe any perceptible colour. The OKLCH converter lets you adjust each value independently with live preview.

The sRGB gamut is the range of colours that can be displayed on standard monitors and screens. Some OKLCH colours have higher chroma values than sRGB can reproduce, especially deep purples, bright cyans, and vivid greens. When this happens, the OKLCH converter shows a warning and calculates the closest in-gamut colour by reducing chroma while keeping the same lightness and hue.

Yes. All conversion happens 100% client-side in your browser using JavaScript. Your colour values are never sent to any server, never stored, and never transmitted anywhere. The OKLCH converter is completely private and processes everything locally on your device.

Yes. The oklch() CSS function is supported in all modern browsers - Chrome 111+, Firefox 113+, Safari 15.4+, and Edge 111+. It is part of CSS Color Level 4 and is recommended for new projects. The OKLCH converter helps you verify what your oklch() values will look like and provides the equivalent HEX and RGB fallbacks for older browser support.

Yes. The OKLCH converter is 100% free with no signup required, no premium features, and no usage limits. Convert unlimited colours without any restrictions or hidden costs. The gamut detection and closest in-gamut colour suggestions are included at no extra charge.

The OKLCH converter uses Björn Ottosson's exact mathematical matrices for OKLab/OKLCH to linear sRGB conversion. These are the same matrices used by the CSS specification and by browser engines. The conversion accuracy is limited only by floating-point precision, which is well below the threshold of human perceptible colour differences.