What this tool does
This conversion turns hue, saturation, and lightness into red, green, and blue sRGB channels. It is the numeric step used before a browser can render an HSL color as ordinary screen pixels.
Enter the values in the calculator above and choose Calculate. The calculation runs in your browser; the inputs are not intentionally sent to a Colormapped application server.
How it works
- Normalize hue to a 0–1 turn and percentages to 0–1.
- For zero saturation, use one gray value for all three channels.
- Otherwise derive the temporary p/q values from lightness and saturation.
- Sample the hue function for red, green, and blue, then round each channel to 0–255.
Worked example
Input
hsl(240 83% 65%)Output
rgb(92, 92, 240)The rounded HSL input resolves to equal red and green channels at 92 with a blue channel of 240.
When to use it
- Convert an HSL CSS/design value into RGB data for graphics code.
- Inspect the channel values produced by a hue or lightness adjustment.
- Prepare a color for APIs that accept integer RGB channels.
Accuracy and limits
- The returned channels are rounded to integers.
- A rounded HSL value may not round-trip to the exact RGB color it originally came from.