HSL to RGB converter

Paste any HSL color and get its RGB value instantly, together with every other format: HEX, RGB, HSL, HWB, CMYK and OKLCH. Free, and it runs in your browser.

  • Free
  • No sign-up
  • Runs in your browser
hsl-to-rgb

Fill in the values above to see the result.

100% private — the calculation is done in your browser and nothing is sent to any server.

How it works

Enter the color

Type or paste a HSL code, or pick a color with the color picker.

Read the RGB value

Every format updates as you type and shows a live preview of the color.

Copy it

Use the copy button next to the format you need.

How to convert HSL to RGB

To convert HSL to RGB, enter your HSL color in the box above and read the RGB value next to it. For example, hsl(199, 89%, 48%) is rgb(13, 162, 231). The result updates as you type, and every other format (HEX, RGB, HSL, CMYK and more) is shown at the same time.

What HSL and RGB mean

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.

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).

Convert HSL to RGB by hand

Here is the calculation for hsl(199, 89%, 48%), step by step:

  1. Start from hue 199°, saturation 89% and lightness 48%.
  2. Use them to find the chroma (the color intensity) and place the hue on the color wheel to get the three channel values: red 13, green 162, blue 231.
  3. Result: rgb(13, 162, 231).

HSL to RGB table of common colors

HSL to RGB
ColorHSLRGB
Blackhsl(0, 0%, 0%)rgb(0, 0, 0)
Whitehsl(0, 0%, 100%)rgb(255, 255, 255)
Redhsl(0, 100%, 50%)rgb(255, 0, 0)
Limehsl(120, 100%, 50%)rgb(0, 255, 0)
Bluehsl(240, 100%, 50%)rgb(0, 0, 255)
Yellowhsl(60, 100%, 50%)rgb(255, 255, 0)
Cyanhsl(180, 100%, 50%)rgb(0, 255, 255)
Magentahsl(300, 100%, 50%)rgb(255, 0, 255)
Grayhsl(0, 0%, 50%)rgb(128, 128, 128)
Orangehsl(39, 100%, 50%)rgb(255, 165, 0)
Purplehsl(300, 100%, 25%)rgb(128, 0, 128)
Pinkhsl(350, 100%, 88%)rgb(255, 192, 203)
Brownhsl(0, 59%, 41%)rgb(165, 42, 42)
Navyhsl(240, 100%, 25%)rgb(0, 0, 128)
Tealhsl(180, 100%, 25%)rgb(0, 128, 128)
Coralhsl(16, 100%, 66%)rgb(255, 127, 80)

When to use HSL and when RGB

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. 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.

Good to know

  • Shorthand HEX codes such as #38F expand to #3388FF, and eight-digit codes carry an opacity value at the end.
  • Values are rounded to whole numbers for display; the converter keeps more precision internally.
  • The color picker lets you pick a color by eye when you do not have its code.
  • Colors displayed on screen depend on your monitor's calibration, so the same code can look slightly different on different devices.

Frequently asked questions

How do I convert HSL to RGB?
Enter the HSL color in the converter at the top of this page and read the RGB value. For hsl(199, 89%, 48%) the result is rgb(13, 162, 231).
What is HSL?
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.
What is RGB?
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).
Can I convert to other formats at the same time?
Yes. The converter shows HEX, RGB, HSL, HWB, CMYK and OKLCH together, and you can copy any of them.
Is the conversion exact?
The result is mathematically derived from the RGB values and rounded for display. CMYK in particular is an approximation, because printers and inks vary.
Is it free and private?
Yes. It is free, needs no sign-up and works in your browser, so the colors you type are never sent to a server.