Convert HSL colors to RGB, with hex, OKLCH and CMYK values alongside.
Enter a valid HSL value, like hsl(25, 95%, 53%)
Lightness and saturation set how far the channels spread, and hue decides which channel is highest. CSS uses this formula:
a = S × min(L, 1 − L)
f(n) = L − a × max(−1, min(k − 3, 9 − k, 1))
where k = (n + H ÷ 30) mod 12
R = f(0), G = f(8), B = f(4), each × 255For hsl(25, 95%, 53%) that gives rgb(249, 116, 21), a bright orange.
| Color | HSL | RGB |
|---|---|---|
| White | hsl(0, 0%, 100%) | rgb(255, 255, 255) |
| Black | hsl(0, 0%, 0%) | rgb(0, 0, 0) |
| Red | hsl(0, 100%, 50%) | rgb(255, 0, 0) |
| Orange | hsl(39, 100%, 50%) | rgb(255, 165, 0) |
| Yellow | hsl(60, 100%, 50%) | rgb(255, 255, 0) |
| Green | hsl(120, 100%, 25%) | rgb(0, 128, 0) |
| Blue | hsl(240, 100%, 50%) | rgb(0, 0, 255) |
| Purple | hsl(300, 100%, 25%) | rgb(128, 0, 128) |
| Pink | hsl(350, 100%, 88%) | rgb(255, 192, 203) |
| Gray | hsl(0, 0%, 50%) | rgb(128, 128, 128) |
Type the hue, saturation and lightness above, like 25, 95%, 53% or hsl(25 95% 53%). The RGB value updates as you type.
Hue is an angle from 0 to 360, where 0 is red, 120 is green and 240 is blue. Saturation and lightness are percentages from 0 to 100.
HSL values are usually rounded to whole numbers, so the same HSL can land a channel or two apart between tools. The difference isn't visible.
Yes. Every browser supports hsl(). You only need RGB or hex when a design tool, email template or older codebase asks for it.