RGB to HSL Converter
Free RGB to HSL converter. Enter red, green, and blue values and instantly get the hue, saturation, and lightness with a live color preview.
hsl(14, 100%, 60%) Please enter values between 0 and 255.
Convert RGB to HSL with Our Free Online Tool
Enter red, green, and blue values (0–255) and instantly see the equivalent HSL (hue, saturation, lightness) values. A color swatch previews the result live as you type.
Why Use HSL Instead of RGB?
HSL is often easier to work with when adjusting colors programmatically. Increasing lightness brightens a color; changing hue rotates it around the color wheel. This makes HSL a natural fit for creating color palettes, hover states, and theming in CSS.
RGB to HSL Conversion Formula
Normalize R, G, B to 0–1, find max and min, then:
- L = (max + min) / 2
- S = delta / (1 − |2L − 1|) where delta = max − min
- H depends on which channel is maximum
Common RGB to HSL Conversions
| R | G | B | H (°) | S (%) | L (%) |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 |
| 255 | 255 | 255 | 0 | 0 | 100 |
| 255 | 0 | 0 | 0 | 100 | 50 |
| 0 | 255 | 0 | 120 | 100 | 50 |
| 0 | 0 | 255 | 240 | 100 | 50 |
| 128 | 128 | 128 | 0 | 0 | 50 |
| 255 | 87 | 51 | 14 | 100 | 60 |
| 52 | 152 | 219 | 204 | 70 | 53 |
| 46 | 204 | 113 | 145 | 63 | 49 |
| 155 | 89 | 182 | 283 | 39 | 53 |