HSL to RGB Converter

What is HSL to RGB Converter

This tool converts HSL values (Hue 0–360°, Saturation 0–100%, Lightness 0–100%) to RGB values (Red, Green, Blue, each 0–255). Use it when you have a color in HSL format — common in CSS and design systems — and need the RGB equivalent for JavaScript, image processing, or design tools that require separate channel values.

How to use

  1. Enter the Hue (0–360), Saturation (0–100), and Lightness (0–100) values in the HSL fields.
  2. RGB and HEX values update instantly.
  3. Click the copy button next to RGB to copy rgb(r, g, b) format.
  4. Switch between all 6 converters using the mode links at the top.

When to use it

Looping hue from 0–360 in JavaScript for a rainbow effect but stuck writing pixels into a Canvas ImageData buffer? That buffer wants separate R, G, B byte values, not an hsl() string. Convert each hsl() output to rgb() here and you get the individual channel numbers ready to drop straight into the array.

Frequently asked questions

What is hsl(120, 100%, 50%) in RGB?

hsl(120, 100%, 50%) is rgb(0, 255, 0) — pure green. Hue 120° is green on the color wheel, 100% saturation and 50% lightness give the pure green.

What is hsl(240, 100%, 50%) in RGB?

hsl(240, 100%, 50%) is rgb(0, 0, 255) — pure blue.

What is hsl(60, 100%, 50%) in RGB?

hsl(60, 100%, 50%) is rgb(255, 255, 0) — pure yellow.

When would I use HSL to RGB instead of HSL to HEX?

Use HSL to RGB when working with APIs or libraries that require separate numeric channel values — like Canvas ImageData, WebGL, Three.js color constructors, or image processing libraries. Use HSL to HEX when you need a CSS string or hex code.

Can I share this tool with my inputs pre-filled?

Yes. The URL updates automatically as you type. Copy it from the address bar or use the Share button — anyone who opens the link will see your exact inputs ready to go.

Related tools