RGB to HSL Converter
Convert RGB color values to HSL format. Great for moving from image colour pickers to more intuitive design adjustments. Browser-only.
CONVERT
All three formats are shown simultaneously regardless of mode.
How it works
The converter scales red, green and blue to 0 to 1, takes lightness as the midpoint of the largest and smallest channel, and derives saturation and hue from their spread and from which channel is largest. rgb(255, 99, 71) gives hsl(9, 100%, 64%). All conversion runs in JavaScript in your browser.
Processing runs in your browser
All computation happens inside your browser tab. Our servers are not involved at any point.
Related operations
To check whether two colours meet WCAG legibility, try the contrast checker. For building a coordinated set from one base colour, use the colour palette generator. To craft smooth multi-stop blends in CSS, see the CSS gradient generator.
Frequently asked questions
- Why convert RGB to HSL?
- HSL is more human-readable and easier to tweak programmatically, you can lighten or darken a colour by changing just the L value.
- Is this accurate?
- The algorithm follows the standard RGB-to-HSL formula. The HSL output is rounded to whole numbers, so converting it back to RGB can shift a channel slightly (by up to 5 out of 255).
- Why is the hue 0 for grey?
- When red, green and blue are equal the color has no hue, so the converter shows hue 0 and saturation 0%: rgb(128, 128, 128) is hsl(0, 0%, 50%).
- Can I enter decimals?
- Yes. R, G and B accept decimals such as 127.5 as long as they stay between 0 and 255. The HEX and HSL results are rounded to whole numbers.
Last reviewed September 30, 2026
Other pages for this tool
Related tools
- Background reading: Complete guide to color tools