Enter the color
Type or paste a RGB code, or pick a color with the color picker.
Paste any RGB color and get its HSL value instantly, together with every other format: HEX, RGB, HSL, HWB, CMYK and OKLCH. Free, and it runs in your browser.
100% private — the calculation is done in your browser and nothing is sent to any server.
Keep going with your result in another tool. Nothing is uploaded.
Type or paste a RGB code, or pick a color with the color picker.
Every format updates as you type and shows a live preview of the color.
Use the copy button next to the format you need.
To convert RGB to HSL, enter your RGB color in the box above and read the HSL value next to it. For example, rgb(245, 158, 11) is hsl(38, 92%, 50%). The result updates as you type, and every other format (HEX, RGB, HSL, CMYK and more) is shown at the same time.
RGB describes a color as amounts of red, green and blue light, each from 0 to 255. rgb(59, 130, 246) is the same color as #3B82F6. CSS also accepts an opacity value, as in rgba(59, 130, 246, 0.5).
HSL describes a color as hue (0 to 360 degrees around the color wheel), saturation (0 to 100 percent) and lightness (0 to 100 percent). It is easier to reason about than RGB: keep the hue and change the lightness to get lighter or darker shades of the same color.
Here is the calculation for rgb(245, 158, 11), step by step:
| Color | RGB | HSL |
|---|---|---|
| Black | rgb(0, 0, 0) | hsl(0, 0%, 0%) |
| White | rgb(255, 255, 255) | hsl(0, 0%, 100%) |
| Red | rgb(255, 0, 0) | hsl(0, 100%, 50%) |
| Lime | rgb(0, 255, 0) | hsl(120, 100%, 50%) |
| Blue | rgb(0, 0, 255) | hsl(240, 100%, 50%) |
| Yellow | rgb(255, 255, 0) | hsl(60, 100%, 50%) |
| Cyan | rgb(0, 255, 255) | hsl(180, 100%, 50%) |
| Magenta | rgb(255, 0, 255) | hsl(300, 100%, 50%) |
| Gray | rgb(128, 128, 128) | hsl(0, 0%, 50%) |
| Orange | rgb(255, 165, 0) | hsl(39, 100%, 50%) |
| Purple | rgb(128, 0, 128) | hsl(300, 100%, 25%) |
| Pink | rgb(255, 192, 203) | hsl(350, 100%, 88%) |
| Brown | rgb(165, 42, 42) | hsl(0, 59%, 41%) |
| Navy | rgb(0, 0, 128) | hsl(240, 100%, 25%) |
| Teal | rgb(0, 128, 128) | hsl(180, 100%, 25%) |
| Coral | rgb(255, 127, 80) | hsl(16, 100%, 66%) |
RGB is the model screens use and the one CSS functions such as rgba() build on, which makes it handy when you need transparency or want to compute colors in code. HSL is best when you want to adjust a color by eye or in code: raise the lightness for a hover state, lower the saturation for a muted variant.
More utilities that also run without leaving your browser.