HSL → RGB Converter

Select Conversion Type

How to convert HSL to RGB

How the conversion works

The chroma is C = (1 - |2L - 1|) x S. The hue picks which two channels get color, a secondary value X = C x (1 - |(H / 60) mod 2 - 1|) fills the middle channel, and m = L - C / 2 is added to every channel before scaling to 0-255.

Example: hsl(210, 100%, 50%) becomes rgb(0, 128, 255).

Good to know

Frequently Asked Questions

Why do I get a gray color?

With saturation at 0, every hue gives gray. Increase the saturation to get color.

Is the result rounded?

Yes. RGB channels are rounded to whole numbers from 0 to 255.

More Color Converters