RGB to HSL Converter
Convert RGB color values to HSL with live, two-way sliders.
About the RGB to HSL Converter
What is RGB to HSL conversion?
RGB describes a color by how much red, green, and blue light it mixes, each from 0 to 255 — it's how screens actually paint pixels. HSL describes the same color the way people think about it: Hue (which color on the wheel), Saturation (how vivid), and Lightness (how light or dark). This converter takes your RGB values and returns the matching hsl(), along with HEX, HSB/HSV, and CMYK and a live preview.
The reason to convert is that HSL is far easier to adjust. Want a lighter version of a color? Nudge one number. HSL is also native to CSS, so the value you get drops straight into a stylesheet. Move the R, G, and B sliders and watch every other format update instantly. It all runs in your browser, so nothing you enter is uploaded.
How to Use This Tool
- Set your RGB color. Drag the Red, Green, and Blue sliders, type exact 0–255 values, paste a HEX code, or use the eyedropper to grab a color from your screen.
- Read the HSL value. The matching
hsl()appears at the top of the results and updates the moment you change anything. - Grab the other formats. HEX, HSB/HSV, and CMYK are listed too, each with a one-click copy button.
- Explore. Click any shade, tint, or harmony swatch to load it, and check the contrast panel for accessibility.
Common Use Cases
- Writing CSS: Turn an RGB value from a design tool into an
hsl()you can paste into a stylesheet. - Building shade scales: Keep the Hue and Saturation and vary only the Lightness for consistent hover and active states.
- Muting a color: Lower the Saturation for calmer backgrounds without changing the hue.
- Understanding a color: The Hue number tells you instantly whether an RGB triple leans blue, green, or red.
- Checking accessibility: See how the color scores as text on white and black against WCAG thresholds.
Need the reverse or another model? Use our HSL to RGB converter, the HEX to HSL converter, or browse all our free color tools.
Frequently Asked Questions
How do I convert RGB to HSL?
Enter your red, green, and blue values with the sliders or number boxes and the HSL result appears instantly. Internally the tool scales each channel to 0–1, finds the lightest and darkest, and works out the Hue, Saturation, and Lightness from there.
Can I use the HSL value directly in CSS?
Yes. HSL is a native CSS format, so you can paste hsl(217, 92%, 60%) straight into a stylesheet. It also accepts an alpha channel, written as hsl(217 92% 60% / 0.5) for 50% opacity.
What's the difference between HSL and HSB?
Both start with Hue, but the third value differs. In HSL, 100% Lightness is always white and 50% is the pure color. In HSB, 100% Brightness at full Saturation is the most vivid version. HSL is handy for light and dark variants; HSB maps better onto design apps like Photoshop.
Does converting RGB to HSL lose any color?
No — RGB and HSL describe the same range of colors. The only quirk is rounding: the H, S, and L are shown as whole numbers for readability, so a round trip can occasionally land one step away. Keep full precision and it matches exactly.
Is this tool free and private?
Completely. There's no sign-up, and the conversion runs entirely in your browser with JavaScript, so your colors are never uploaded or logged. It even works offline once the page has loaded.