Text & code / MULTIVERTO

HSL to RGB color

Turn hue, saturation and lightness into integer RGB channels.

Live converterYour input stays in this browser. No text is uploaded for conversion.

The file stays in your browser.
Chain tools

Apply each text tool to the previous result. Text workflows ↗

Only the recipe name and tool order are saved in this browser. Your input and results are never saved.

01 / Example

Example

Your inputhsl(210, 70%, 50%)
Resultrgb(38, 128, 217)

02 / Guide

HSL to RGB color — How it works

Building channels from HSL

Turn hue, saturation and lightness into integer RGB channels. Use this direction when a color design starts with a hue and two percentages but another tool requires numeric RGB channels. Enter hsl(210, 70%, 50%) or the same comma-separated values. The hue runs from zero through 360 degrees; saturation and lightness each run from zero to one hundred percent.

Hue chooses a color sector; chroma and lightness determine the three RGB channels, rounded to integers. The algorithm finds a chroma from saturation and lightness, places it in the hue sector, then adds a common offset to form red, green and blue. It rounds channels to integers from zero to 255. A hue of 360 degrees wraps to zero. An HSL color at zero saturation becomes gray regardless of its hue.

Understanding the color models

Before using the result in software that asks for integer channels, verify that the input percentages mean saturation and lightness in that order. The three input components describe hue and two percentages; transparency and display profiles lie outside this conversion. Pick the form expected by the place where you will paste the result. CSS accepts both hex and rgb() or hsl() syntax, but a design system or graphics program may store channels separately. This tool uses ordinary sRGB arithmetic; it does not convert between display profiles or predict how every monitor will reproduce a color. Neither three-channel HEX nor these RGB and HSL outputs include transparency. Integer RGB channels and displayed HSL decimals can also round, so a round trip may differ by one channel value.

Choosing the right representation

At zero saturation, changing hue cannot change the gray output; at zero lightness every valid hue becomes black. At full lightness every hue becomes white. These endpoint checks are more reliable than judging a tiny preview alone. The computed channels are rounded to integers, so a later RGB-to-HSL pass may not reproduce every decimal of the original percentages. Preserve the HSL source if you plan to keep editing hue or saturation in a design system.

For a concrete check, the example input hsl(210, 70%, 50%) produces rgb(38, 128, 217). Use a zero-saturation input to verify the gray case: changing hue alone must not change the resulting equal RGB channels. At extreme lightness, the output tends to black or white regardless of hue. Examine the rounded whole-number channels before pasting them into an API that expects integers. A reverse conversion may give slightly different HSL percentages because the integer result has fewer possible values than the original decimals.

How this conversion transforms the input
HSL color
Colour channels
RGB color

Explore guides

Conversion guides

Explore guides