RGB to HSL Converter
Convert RGB color values to HSL format. See hue, saturation, and lightness with a live color preview.
RGB to HSL Converter tool
Example
Input: Red 196, Green 101, Blue 58
Result: HSL: hsl(19, 54%, 50%), HEX: #C4653A
Lightness is the average of the largest and smallest channel, saturation is their spread relative to lightness, and hue is the angle of the dominant channel (red, leaning toward green) on the color wheel.
RGB to HSL for Common Colors
| Color | RGB | HSL |
|---|---|---|
| Red | rgb(255, 0, 0) | hsl(0, 100%, 50%) |
| Orange | rgb(255, 165, 0) | hsl(39, 100%, 50%) |
| Yellow | rgb(255, 255, 0) | hsl(60, 100%, 50%) |
| Green | rgb(0, 128, 0) | hsl(120, 100%, 25%) |
| Teal | rgb(0, 128, 128) | hsl(180, 100%, 25%) |
| Blue | rgb(0, 0, 255) | hsl(240, 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%) |
| Gray | rgb(128, 128, 128) | hsl(0, 0%, 50%) |
Computed with the converter, rounded to whole numbers. Names follow the CSS named colors.
- Enter the red, green, and blue values as integers between 0 and 255 in the respective input fields or use the sliders.
- Watch the live color preview swatch update as you type or adjust each channel value.
- Read the converted hue (0-360 degrees), saturation (0-100%), and lightness (0-100%) results displayed below.
- Copy the HSL output in CSS-ready format such as hsl(11, 100%, 60%) using the copy button.
- Use the HSL values to manipulate lightness or saturation independently in your CSS or design workflow.
RGB vs HSL: Why Designers Convert
HSL describes a color by hue, saturation and lightness instead of red, green and blue light. rgb(196, 101, 58) becomes hsl(19, 54%, 50%): an orange hue at 19 degrees, fairly vivid, at medium lightness. Enter any RGB values and this tool gives you the HSL and hex versions.
RGB is how screens make color, but it is hard to edit by feel. To make a color a little lighter in RGB, you have to change all three numbers. In HSL you raise one number, lightness, and the hue stays put. That makes HSL handy for hover states, muted variants and whole color themes in CSS.
Here is what each part means. Hue is an angle on the color wheel: 0 is red, 120 is green and 240 is blue. Saturation runs from 0% (gray) to 100% (full color). Lightness runs from 0% (black) through 50% (the pure color) to 100% (white).
The tool rounds hue to a whole degree and the two percentages to whole numbers, the way CSS usually writes them. Because of that rounding, a round trip can drift by one step. hsl(19, 54%, 50%) converts back to rgb(196, 102, 59), not 101 and 58. For the reverse direction, use the HSL to Hex Converter.
Formula / How It Works
Sources
Frequently Asked Questions
Related Tools
Hex to RGB Converter
Convert hexadecimal color codes to RGB values instantly. Supports shorthand and 8-digit hex with alpha.
Color ToolsHSL to Hex Converter
Convert HSL color values to hexadecimal codes. Enter hue, saturation, and lightness for instant hex output.
Color ToolsColor Picker
Pick any color visually and get values in hex, RGB, HSL, and CMYK. Interactive saturation panel and hue slider.
Color Tools