HSL to RGB Converter – Free, Instant & Online

Convert HSL to RGB instantly. Enter hue, saturation, and lightness values and get exact RGB numbers plus a live colour swatch. Free, browser-based, no

RGB

rgb(28, 116, 233)

All formats

HEX#1C74E9
RGBrgb(28, 116, 233)
HSLhsl(214, 82%, 51%)
HSVhsv(214, 88%, 91%)
CMYKcmyk(88%, 50%, 0%, 9%)

Converts instantly in your browser. Accepts #hex, rgb(…), hsl(…), hsv(…) and cmyk(…).

Convert HSL to RGB in One Click

Type in any HSL colour value and get the exact RGB numbers instantly — no formulas, no guessing. The tool also shows you a live colour swatch and the same colour in every other format (HEX, HSV, CMYK) so you always leave with exactly what you need.

How to Use the HSL to RGB Converter

  1. Enter your HSL values in the fields above — H (hue, 0–360), S (saturation, 0–100%), and L (lightness, 0–100%).
  2. The RGB result appears immediately. No button to press.
  3. Click the RGB value to copy it straight to your clipboard.
  4. Check the live swatch to confirm the colour looks right before you paste it anywhere.

Worked Example: HSL to RGB Conversion

Say your design file gives you a vivid sky blue: HSL(200, 80%, 55%).

Paste those three numbers into the tool and you get:

FormatValue
HSL (input)hsl(200, 80%, 55%)
RGB (output)rgb(51, 178, 229)
HEX (bonus)#33b2e5

That R 51, G 178, B 229 value is ready to drop straight into CSS, a canvas element, or any graphics library that expects red/green/blue channels between 0 and 255.

What Do the RGB Channels Actually Mean?

RGB describes a colour as three light intensities: Red, Green, and Blue, each on a scale from 0 (none) to 255 (full). Mixing those three values produces every colour your screen can show. So rgb(51, 178, 229) means a little red, a lot of green, and even more blue — which your eye reads as that clear sky blue.

How to Convert HSL to RGB in Code

If you need this conversion inside an app, here are the simplest ready-to-run snippets.

Python

import colorsys

h, s, l = 200 / 360, 80 / 100, 55 / 100
r, g, b = colorsys.hls_to_rgb(h, l, s)   # note: Python uses HLS order
print(int(r * 255), int(g * 255), int(b * 255))
# Output: 51 178 229

Python's built-in colorsys module takes values in the 0–1 range and uses HLS order (hue, lightness, saturation) — just keep that swap in mind.

JavaScript

function hslToRgb(h, s, l) {
  s /= 100; l /= 100;
  const k = n => (n + h / 30) % 12;
  const a = s * Math.min(l, 1 - l);
  const f = n => l - a * Math.max(-1, Math.min(k(n) - 3, Math.min(9 - k(n), 1)));
  return [
    Math.round(f(0) * 255),
    Math.round(f(8) * 255),
    Math.round(f(4) * 255)
  ];
}

console.log(hslToRgb(200, 80, 55));
// Output: [51, 178, 229]

This single function works in any modern browser or Node.js environment — no libraries needed.

How the Conversion Works

HSL (Hue, Saturation, Lightness) describes colour the way humans think about it: the colour wheel position, how vivid it is, and how bright it is. RGB is how screens actually produce it: mixing red, green, and blue light.

Converting between them is a well-defined mathematical formula from the W3C CSS Color spec. The hue angle is split into 60° sectors across the colour wheel; saturation and lightness together determine how much of each primary channel to mix. The tool runs this formula entirely in your browser — your colour values are never sent to any server.

When to Use HSL → RGB (and When Not To)

  • Use it when your CSS or design tool gives you HSL values but your graphics library, game engine, or canvas API expects rgb() integers.
  • Use it when you're generating colours programmatically (e.g. stepping hues around the colour wheel) and need the final values in RGB.
  • Skip it if you're working purely in CSS — modern browsers accept hsl() natively in stylesheets, so no conversion is needed there.
  • Skip it for print work. Screens use RGB; printers use CMYK. If you're preparing artwork for print, convert to CMYK instead.

Need to go in the other direction? The same tool lets you convert RGB to HSL — just enter your RGB values in the input instead.

The tool runs 100% in your browser. No sign-up, no upload, no data stored anywhere. Your colours stay private.

Takeaway: The next time a design hands you an HSL code but your code needs RGB, paste it above and copy the result in under a second.

Frequently asked questions

Is this HSL to RGB converter free?+
Yes, completely free. No account, no credit card, no usage limit. Just open the page and convert.
Are my colour values uploaded or stored anywhere?+
No. The conversion runs entirely in your browser using JavaScript. Nothing is sent to a server, so your values stay completely private.
What is HSL and how is it different from RGB?+
HSL stands for Hue, Saturation, Lightness — it describes colour the way humans think about it (what colour, how vivid, how bright). RGB describes the same colour as three light intensities (red, green, blue) that a screen mixes together. Both describe the same colours; they just use different coordinate systems.
How do I convert HSL to RGB in Python?+
Use the built-in colorsys module: colorsys.hls_to_rgb(h/360, l/100, s/100) — note it uses HLS order, not HSL. Multiply each result by 255 and round to get the 0–255 integers.
How do I convert HSL to RGB in JavaScript?+
There's no native browser function for this, but the worked example on this page has a short, dependency-free function you can copy straight into any project. It handles all edge cases and works in Node.js too.
Can I convert RGB back to HSL with this tool?+
Yes. The same tool works in both directions. Enter RGB values and it will show you the HSL equivalent — along with HEX, HSV, and CMYK.
Why does CSS already support hsl() — do I even need to convert?+
Not for CSS. Modern browsers accept hsl(200, 80%, 55%) directly in stylesheets. You only need the RGB numbers when a library, API, or tool specifically requires rgb(r, g, b) integer values.
What range of values does HSL use?+
Hue (H) runs from 0 to 360 degrees around the colour wheel. Saturation (S) and Lightness (L) are both percentages from 0% to 100%. The RGB output will always be three integers between 0 and 255.