RGB to HSL

Enter red, green and blue values from 0 to 255 to convert RGB to HSL right away. You get a live preview and the same color as HEX and CMYK.

  • Free
  • No sign-up
  • Runs in your browser
e.g. rgb(79, 51, 232) or 79 51 232
HSL
hsl(249, 80%, 55%)

HEX#4F33E8
RGBrgb(79, 51, 232)
HSLhsl(249, 80%, 55%)
CMYKcmyk(66%, 78%, 0%, 9%)

Runs in your browser — nothing you enter is sent to our servers.

How to use RGB to HSL converter

  1. Type the color as rgb(79, 51, 232) or simply 79 51 232.
  2. Read the HSL result and the preview swatch, which update as you type.
  3. Copy the hsl() value or any other format from the list.

Features

  • Accepts rgb(), rgba() and three plain numbers
  • Channels can be whole numbers from 0 to 255 or percentages
  • Shows hue in degrees, saturation and lightness in percent
  • Lists HEX and CMYK too, with copy buttons
  • Runs in your browser with no upload

Examples

InputResult
rgb(79, 51, 232)hsl(249, 80%, 55%)
34 197 94hsl(142, 71%, 45%)
rgb(128, 128, 128)hsl(0, 0%, 50%)

Limitations

  • HSL is shown as whole numbers, so going back to RGB can shift a channel slightly. Greys have no hue, so the tool shows hue 0 and saturation 0 percent for them. The tool expects whole-number channels; decimals are rejected.

Learn more

RGB and HSL describe the same screen colors in different ways. RGB states how much red, green and blue light is mixed, which is how displays work. HSL re-expresses that mix as a hue angle, a saturation percentage and a lightness percentage, which matches how designers talk: "a slightly darker blue" or "less intense green".

Converting is deterministic, so a given RGB triple always gives the same HSL triple. The only loss happens when you round: HSL is usually written in whole numbers, and converting back can change a channel by a unit or two. For design tokens, keep one source format, and derive the others with a converter like this one whenever you need them. Modern CSS accepts rgb() and hsl() equally.

Frequently asked questions

How do I convert RGB to HSL?

Divide each channel by 255, find the largest and smallest, then derive lightness from their average, saturation from their difference and hue from which channel is largest. The tool shows the result as you type.

Why is the hue 0 for grey colors?

Grey has equal red, green and blue, so there is no dominant color and hue is undefined. The convention is to show 0 degrees with 0 percent saturation.

Can I enter percentages instead of 0 to 255?

Yes. Values such as rgb(31%, 20%, 91%) are accepted and rounded to the nearest whole channel value.

Why use HSL instead of RGB in CSS?

HSL makes it easier to adjust a color by eye. You can change lightness for hover or disabled states while keeping the same hue.

Sources

Last reviewed: September 30, 2026