Skip to content
ColorsGuide

HSL to HEX converter

Enter a HSL value such as hsl(12 76% 61%) 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 HSL.

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

Name
Vermilion(descriptive)
Alpha
100%
Relative luminance
0.2878
Perceived lightness (OKLCH L)
67.7%
Contrast on white
3.11:1
Contrast on black
6.76:1

See shades, harmonies and palettes for #E76E50

Converted values

  • HEX#e76e50
  • RGBrgb(231 110 80)
  • HSLhsl(12 76% 61%)
  • HSV / HSBhsv(12 65.4% 90.6%)
  • HWBhwb(12 31.4% 9.4%)
  • OKLCHoklch(67.72% 0.1571 35.19)
  • OKLABoklab(67.72% 0.1284 0.0906)
  • CIELABlab(61.23% 46.33 39.92)
  • CMYKcmyk(0% 52% 65% 9%)

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 HSL to HEX

  1. Compute the chroma: C = (1 − |2L − 1|) × S.
  2. Use the hue sector (H ÷ 60) to place C and an intermediate value on the right channels.
  3. Add the lightness offset m = L − C/2 to each channel and multiply by 255.
  4. Round and write each channel as two hexadecimal digits.

About HSL

HSL describes a colour as a hue angle (0–360°), saturation and lightness. It is easy to adjust by hand, but its lightness is not perceptual: a yellow and a blue at 50% lightness look very different in brightness.

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

SwatchHSLHEX
hsl(0 0% 100%)#ffffff
hsl(0 0% 0%)#000000
hsl(0 100% 50%)#ff0000
hsl(158.2 100% 32.9%)#00a86b
hsl(209.6 100% 55.9%)#1e90ff
hsl(50.6 100% 50%)#ffd700
hsl(300 100% 25.1%)#800080
hsl(16.1 100% 65.7%)#ff7f50
hsl(210 12.6% 50.2%)#708090
hsl(60 55.6% 91.2%)#f5f5dc
hsl(197.3 37.2% 23.7%)#264653
hsl(12 75.8% 61.2%)#e76f51

Other conversions

Was this page useful?