Convert HSL to Perceptual OKLCH

Upgrade uneven HSL CSS colors into perceptually uniform oklch() tokens so lightness matches human vision across all hues.

0 bytes sent
  • 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

Perceptually Uniform Lightness
Input Samplebutton-fill.hsl
hsl(221.2 83.2% 53.3%)
Expected OutputOKLCH
oklch(0.546 0.2153 262.87)

HSL vs OKLCH

Source vs. target format specification comparison
PropertySource: HSLTarget: OKLCH
Gamut scopesRGB (Standard Web)Wide Gamut (P3 / Unbounded)
Perceptual uniformityNoYes
Alpha channel supportYesYes
Human readabilityHighHigh
Extension / Token.css.css / .json
Best forLegacy CSS theme variables and simple single-hue mental tweaks in sRGBPerceptually uniform UI palettes, Tailwind v4 design tokens, and wide-gamut CSS

How to use HSL to OKLCH

HSL to OKLCH — cleanly inside your local browser with zero server transfers.

  1. Enter or pick a colorType Hex, RGB, HSL, OKLCH, or Lab — or click Screen Eyedropper and live sliders.
  2. Inspect math & gamutReview exact CSS Color 4 readouts, sRGB vs Display P3 status, and profile options.
  3. Copy, chain, or exportCopy ready CSS/JSON snippets, download binary swatch files, or pipe directly to related Colr tools.

Frequently asked questions

Why does 50% HSL lightness change when converted to OKLCH L?

HSL treats bright yellow and dark blue equally at 50% L, whereas OKLCH reflects true human luminance (L ~97% yellow vs ~45% blue).

Should I migrate my CSS variables from HSL to OKLCH?

Yes — OKLCH preserves uniform accessibility ratios across every hue in modern theme palettes.