OKLCH Color Picker
Pick colours in the perceptually uniform OKLCH space (lightness · chroma · hue) — and see whether each pick fits inside the sRGB display gamut.
- oklch()oklch(65.0% 0.180 240.0)
- Hex (clipped)#0099f0
- rgb()rgb(0, 153, 240)
- hsl()hsl(202, 100%, 47%)
- oklab()oklab(65.0% -0.090 -0.156)
Lightness 0–1 (0 = black, 1 = white). Chroma 0 is neutral grey; values above 0.3 often land outside sRGB.
How to use
- Drag L, C, H to dial in the colour — keep an eye on the gamut badge.
- Drop chroma a little when the gamut badge turns amber if you want the on-screen swatch to be exact.
- Copy whichever form your stylesheet needs: modern stacks should reach for the oklch() string.
About this tool
ShowHide
OKLCH is the colour space CSS Color 4 introduced so that lightness, chroma and hue behave the way the eye expects. Move the hue while holding the other two and the perceived brightness stays put; do the same in HSL and it does not. The picker exposes all three channels plus alpha, and shows the oklch() string, the sRGB hex, rgb and hsl equivalents, the underlying OKLab a/b coordinates, and a warning when the colour you have asked for lies outside what an sRGB monitor can display.
The difference from HSL is not subtle, and one comparison makes it concrete. Pure yellow and pure blue both sit at lightness 50% in HSL, which is why a palette built by rotating HSL hue produces some swatches that glare and others that vanish. In OKLCH the same two colours land at lightness 0.97 and 0.45 — numbers that match what you actually see. The scale is anchored to perception rather than geometry, which is also why mid-grey #808080 comes out near 0.60 rather than 0.50: the sRGB midpoint is lighter than half.
Lightness runs 0 to 1, hue 0 to 360, and chroma has no fixed maximum — it is an absolute distance from grey, and how much of it a display can render depends on the display. That is the source of the gamut warning. Ask for a chroma that sRGB cannot reach and a browser will not fail; it maps the colour to something it can show, and the CSS specification says to do that by reducing chroma while holding lightness and hue, so your colour comes back less saturated but the right brightness and the right hue. A wide-gamut screen will show more of what you asked for than a standard one, which means a heavily saturated OKLCH colour is not the same colour for every visitor.
The practical payoff is building a scale. Pick a hue and a chroma, step the lightness evenly, and you get a ramp whose steps look evenly spaced — the thing that takes manual fiddling in hex and still comes out lumpy. Holding lightness constant across several hues gives a categorical palette whose colours carry equal visual weight, which is exactly what a chart legend needs and what HSL cannot deliver.
Frequently asked questions
Why does my colour show "outside sRGB"?
Standard monitors can only show a limited slice of human-visible colour (sRGB). OKLCH is a wider, perceptually-uniform space, so it lets you specify colours that simply don't fit on an sRGB screen. Browsers clip those to the nearest sRGB match — the hex preview shows the clipped result.
Why prefer oklch() over hsl()?
HSL was built on RGB so its lightness is uneven across hues (yellow looks much brighter than blue at the same L). OKLCH was tuned against real perception data, so animations, theme tokens, and accessibility ratios stay predictable as you change hue.
What is chroma, and why does the maximum change with lightness and hue?
Chroma is how far a colour is from grey, and unlike saturation it is not a percentage of an available range — it is an absolute distance, so the largest usable value depends on where you are. Screens can show far more saturated yellow than saturated blue at the same lightness, which is why a chroma that is perfectly displayable at one hue falls outside the gamut a few degrees away.
Which colour space should a design system store?
Store what you author in, and let the output format be a detail. OKLCH is worth authoring in because a shade ramp built by moving lightness alone stays even to the eye, and because a hue rotation keeps the colours equally bright — neither of which holds in HSL. Convert to whatever the target needs, keeping the original values so a later, wider-gamut output is a re-export rather than a re-design.
Guides on this topic
Related tools
CSS color-mix() Preview (Interpolation Space Comparison)
Compare how CSS color-mix() blends two colors across interpolation spaces (srgb, hsl, oklch, lab, lch, hwb) — live swatches and copyable CSS.
Color & CSS
Color Name Finder
Find the closest CSS, Tailwind, or XKCD-survey color name for any hex/RGB input — ranked by perceptual distance in OKLab color space.
Color & CSS
Color Format Converter
Convert any color between HEX, RGB, HSL, HSV, OKLCH, and a CSS custom property.
Color & CSS
Color Distance (ΔE)
Pick two colors and see how perceptually different they are — CIE76 ΔE, CIEDE2000 ΔE, and plain RGB distance with a side-by-side swatch.
Color & CSS
Color Lerp / Gradient Steps
Pick two hex colors, get N discrete intermediate steps — in sRGB, linear RGB, OKLab or HSL — with optional easing.
Color & CSS
CSS Gradient Generator
Build linear or radial CSS gradients with multi-stop colors and copy the code.
Color & CSS