Skip to content
ColorsGuide

RGB to HSL converter

Enter a RGB value such as rgb(231 111 81) to convert it to HSL. Every other format is shown too, and the result updates as you type.

Example paletteUsed until you create or choose your own

Detected RGB.

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.2895
Perceived lightness (OKLCH L)
67.8%
Contrast on white
3.09:1
Contrast on black
6.79:1

See shades, harmonies and palettes for #E76F51

Converted values

  • HEX#e76f51
  • RGBrgb(231 111 81)
  • HSLhsl(12 75.8% 61.2%)
  • HSV / HSBhsv(12 64.9% 90.6%)
  • HWBhwb(12 31.8% 9.4%)
  • OKLCHoklch(67.83% 0.1559 35.18)
  • OKLABoklab(67.83% 0.1274 0.0898)
  • CIELABlab(61.37% 45.95 39.53)
  • 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 RGB to HSL

  1. Divide red, green and blue by 255.
  2. Find the maximum and minimum channel; lightness is their average.
  3. If max equals min the colour is grey (saturation 0); otherwise saturation = (max − min) ÷ (1 − |2L − 1|).
  4. Hue is calculated from the dominant channel and converted to degrees.

About RGB

RGB gives the same three sRGB channels as decimal numbers from 0 to 255 (or 0–100%). Modern CSS writes rgb(255 87 51 / 50%) with spaces and a slash before the alpha; the older comma form rgba(255, 87, 51, 0.5) still works everywhere.

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.

Examples

SwatchRGBHSL
rgb(255 255 255)hsl(0 0% 100%)
rgb(0 0 0)hsl(0 0% 0%)
rgb(255 0 0)hsl(0 100% 50%)
rgb(0 168 107)hsl(158.2 100% 32.9%)
rgb(30 144 255)hsl(209.6 100% 55.9%)
rgb(255 215 0)hsl(50.6 100% 50%)
rgb(128 0 128)hsl(300 100% 25.1%)
rgb(255 127 80)hsl(16.1 100% 65.7%)
rgb(112 128 144)hsl(210 12.6% 50.2%)
rgb(245 245 220)hsl(60 55.6% 91.2%)
rgb(38 70 83)hsl(197.3 37.2% 23.7%)
rgb(231 111 81)hsl(12 75.8% 61.2%)

Other conversions

Was this page useful?