Skip to content
ColorsGuide

OKLCH to HEX converter

Enter a OKLCH value such as oklch(0.65 0.2 260) to convert it to HEX. Every other format is shown too, and the result updates as you type.

Example paletteUsed until you create or choose your own

Detected OKLCH. This colour is outside the sRGB gamut, so it was mapped to the nearest displayable colour.

Examples: #1e90ff, rgb(30 144 255 / 50%), hsl(210 100% 56%), oklch(0.65 0.18 255), cmyk(88% 44% 0% 0%), tomato

Name
Blue(descriptive)
Alpha
100%
Relative luminance
0.268
Perceived lightness (OKLCH L)
65%
Contrast on white
3.3:1
Contrast on black
6.36:1

See shades, harmonies and palettes for #448BFF

Converted values

  • HEX#448bff
  • RGBrgb(68 139 255)
  • HSLhsl(217.5 100% 63.4%)
  • HSV / HSBhsv(217.5 73.1% 100%)
  • HWBhwb(217.5 26.9% 0%)
  • OKLCHoklch(65% 0.1872 260)
  • OKLABoklab(65% -0.0325 -0.1844)
  • CIELABlab(57.8% 7.96 -65.62)
  • CMYKcmyk(73% 46% 0% 0%)

CMYK is a naive, device-independent approximation. Real print colours depend on the ink, paper and ICC profile your printer uses, so ask your printer for a proofed conversion. HSV/HSB is not a CSS format and is shown for design apps. CIELAB uses the D50 white point, as in CSS lab().

How to convert OKLCH to HEX

  1. Convert hue and chroma back to OKLab a and b (a = C·cos H, b = C·sin H).
  2. Apply the inverse OKLab matrices and cube the intermediate values to get linear sRGB.
  3. If any channel falls outside 0–1 the colour is out of gamut: reduce chroma, keeping lightness and hue, until it fits.
  4. Apply the sRGB gamma curve, multiply by 255 and write the channels in hexadecimal.

About OKLCH

OKLCH is a perceptual colour space: L is perceived lightness (0–100%), C is chroma (colourfulness) and H is hue. Equal steps look roughly equal to the eye, which makes it the best choice for building colour scales and accessible palettes. Supported natively in CSS.

About HEX

A HEX code writes the red, green and blue channels of an sRGB colour as two hexadecimal digits each (00–FF), so #FF5733 means red 255, green 87, blue 51. An optional fourth pair adds transparency, and three-digit shorthand such as #F53 doubles each digit.

Examples

SwatchOKLCHHEX
oklch(100% 0 0)#ffffff
oklch(0% 0 0)#000000
oklch(62.8% 0.2577 29.23)#ff0000
oklch(64.48% 0.1488 158.78)#00a86b
oklch(65.2% 0.1901 253.21)#1e90ff
oklch(88.68% 0.1822 95.33)#ffd700
oklch(42.09% 0.1935 328.36)#800080
oklch(73.51% 0.168 40.25)#ff7f50
oklch(59.25% 0.0309 248.35)#708090
oklch(96.36% 0.0328 107)#f5f5dc
oklch(37.53% 0.0438 226.2)#264653
oklch(67.83% 0.1559 35.18)#e76f51

Other conversions

Was this page useful?