HSL to RGB converter

Press / to edit
Black text 9.92:1#12C2E9

Result

RGBrgb(18, 194, 233)
HEX#12C2E9
HSLhsl(191, 86%, 49%)
HSVhsv(191, 92%, 91%)
CMYKcmyk(92%, 17%, 0%, 9%)
OKLCHoklch(75.33% 0.1346 219.54)
LABlab(72.62 -26.21 -30.54)

Set hue, saturation and lightness, and read the matching RGB value instantly. Hex, HSV and CMYK come along for free, so you always see the full picture.

Try an example
Grow a palette

Select any swatch to convert it.

Open in palette generator
Shades and tints
Complementary
Analogous
Triadic
Batch colors

Paste several hex codes, one per line or comma-separated. Each one becomes a swatch you can copy, and the set can be saved as a palette.

How HSL becomes RGB

HSL and RGB describe the same colors from different angles. HSL starts with a hue in degrees, then applies saturation and lightness to decide how vivid and how bright the color is. RGB instead states the raw amount of red, green and blue light. To convert, HueKit works out a base color from the hue, scales it by the saturation, and then shifts it up or down by the lightness before splitting the result into three channels.

Because the two models sit in the same color space, nothing is lost in the trip. The only change is that each channel is rounded to a whole number from 0 to 255, which is exactly what screens and code expect.

Why design in HSL first

HSL keeps hue separate from brightness, which makes it the natural place to build a scale. Hold the hue and saturation steady, step the lightness, and you get a clean run from light to dark that still reads as one color. Once the scale looks right, convert each stop to RGB for the code that needs it.

  • Fix hue and saturation, step lightness, and you get a clean scale.
  • Nudge the hue slightly to warm or cool a whole palette at once.
  • Drop saturation for muted, sophisticated neutrals.

For the opposite direction, the RGB to HSL converter and the full color converter have you covered.

A worked example

Starting from hsl(221, 83%, 53%):

  1. Chroma = (1 - |2L - 1|) x S = (1 - 0.0666) x 0.8319 = 0.7765
  2. H' = H / 60 = 221.21 / 60 = 3.6868, which lands in sector 3
  3. X = C x (1 - |H' mod 2 - 1|) = 0.2432
  4. m = L - C / 2 = 0.5333 - 0.3882 = 0.1451
  5. Add m to each channel and multiply by 255: rgb(37, 99, 235)

Result: rgb(37, 99, 235)

Rounding to whole channel values can move a result by one step out of 255 compared with the original color.

Frequently asked questions

How do I convert HSL to RGB?

Hue picks a base color on the wheel, saturation sets how far it is pulled from grey, and lightness sets how far it is pushed toward black or white. HueKit maps those three values onto red, green and blue channels from 0 to 255 as you move the sliders.

Does HSL to RGB lose any color?

No. HSL and RGB both describe the same standard color space, so the conversion is exact apart from rounding each channel to a whole number. You can move back and forth without drifting.

Why convert HSL to RGB at all?

HSL is easy for humans to reason about, but many APIs, canvas calls and older tools expect raw RGB. Converting lets you design in HSL and then hand off the numbers a program actually wants.

Related tools

Last updated by FusionStudios. Every value on this page is computed by the same functions the tools use. How this is calculated.