Set the hue in degrees and the saturation and lightness percentages below to get the matching rgb() string and a live swatch. The hue-to-RGB math runs locally, so your color values never leave the page.

RGBrgb(107, 114, 255)
Worked HSL to RGB conversions
HSLRedGreenBlue
0, 100%, 50%25500
120, 100%, 50%02550
240, 100%, 50%00255
237, 100%, 71%107114255
0, 0%, 50%128128128
Worked example
hsl(237, 100%, 71%)rgb(107, 114, 255)

Hue, saturation, and lightness are projected back onto the RGB cube.

Frequently asked questions

How does HSL convert back to RGB?

Lightness and saturation produce two helper values, and the hue selects how those values blend across the red, green, and blue channels. Each channel is then scaled to the 0–255 range.

Why might RGB differ slightly when round-tripping?

Both directions involve floating-point math and rounding, so converting RGB to HSL and back can land one step away on a channel. The displayed color is unchanged.

What if lightness is 0% or 100%?

At 0% lightness every channel is 0 (black) and at 100% every channel is 255 (white), regardless of hue or saturation. Those edges are handled correctly here.

Is the conversion private?

Yes. It runs entirely in your browser in JavaScript, with no upload of your color values.

Related conversions

Need more options? Try the full Color Picker.