All tools

HSL to RGB Color Converter

Enter hue (0-360 degrees), saturation, and lightness (percentages) and this tool converts your color to RGB format (0-255 red, green, blue). Ideal for taking an HSL color defined in CSS and using it in image editors or other tools.

HSL to RGB Color Converter
FORMULA ENGINE
Results
Live previewhsl(210, 65%, 45%)
Red (R)40
Green (G)115
Blue (B)189

The R, G, B values in the output show the red, green, and blue channel intensities on a 0-255 scale. You can use these values directly in CSS as rgb(R, G, B) or in image editing software.

How to interpret the result

The R, G, B values in the output show the red, green, and blue channel intensities on a 0-255 scale. You can use these values directly in CSS as rgb(R, G, B) or in image editing software.

How is HSL converted to RGB?

First, a 'chroma' value (C) is calculated from saturation and lightness. Temporary R, G, B values are assigned based on which 60-degree segment the hue falls into, and finally a lightness offset (m) is added and the result is scaled to the 0-255 range.

Formula

  • Saturation and lightness are converted from percentages to a 0-1 range.
  • A 'chroma' value (C) is calculated independently of the lightness offset (m).
  • The 60-degree segment that the hue value falls into is determined.
  • Based on that segment, temporary values (a combination of C, X, 0) are assigned to the R, G, B channels.
  • The lightness offset (m) is added and the result is multiplied by 255 to get the final R, G, B values.

Example HSL to RGB conversion

H=210°, S=65%, L=45% (a vivid blue) converts to approximately R=40, G=115, B=189.

Tips for HSL to RGB conversion

  • Enter hue (H) between 0 and 360 degrees; 360 degrees corresponds to the same color as 0 degrees (red).
  • Enter saturation and lightness as percentages (0-100); decimal values give a more precise result.
  • The resulting RGB values may come out as decimals; round to the nearest whole number when using them on screen or in CSS.

Comparisons

HSL(0°, 100%, 50%)

RGB(255, 0, 0)

Pure red; the starting point of the color wheel.

HSL(120°, 100%, 50%)

RGB(0, 255, 0)

Pure green; 120 degrees around the color wheel.

HSL(240°, 100%, 50%)

RGB(0, 0, 255)

Pure blue; 240 degrees around the color wheel.

HSL(0°, 0%, 50%)

approximately RGB(128, 128, 128)

Neutral gray; hue is visually meaningless once saturation is zero.

HSL to RGB color conversion guide

The HSL (Hue, Saturation, Lightness) model is one of the formats designers reach for most often when defining a color, because adjusting hue, saturation, and lightness independently makes it easy to build variations of a color. However, since screens and most image formats process color as RGB, an HSL-defined color must be converted to RGB before it can be displayed.

This conversion hinges on determining which 60-degree segment of the color wheel the hue (H) falls into; the wheel is divided into six equal 60-degree segments, and in each one a different combination of the red, green, and blue channels becomes dominant.

Saturation and lightness determine how 'wide' (chroma, C) the channel values within that segment will be. Higher saturation produces more vivid colors, lower saturation produces more muted, gray-leaning colors, and lightness shifts the result toward black or white.

This tool processes the H, S, L values you enter through the standard conversion steps to produce directly usable R, G, B values. You can use the results in CSS's rgb() function, in image editing software, or in any other color-based tool.

Converting HSL to RGB is especially useful for developers who need to hand off brand colors defined with HSL in a design system to third-party tools — such as legacy image editors or print software — that expect RGB or HEX input.

FAQ

What is HSL?

HSL is a color model that describes a color using three components: hue, saturation, and lightness.

What is RGB?

RGB is a color model that creates colors on screens by combining red, green, and blue light intensities, each ranging from 0 to 255.

Why convert HSL to RGB?

This conversion is needed to take a color defined with HSL in CSS or a design tool and use it in image editors or other RGB-based systems.

What happens if the hue (H) value exceeds 360?

Since hue wraps around the color wheel, 360 degrees represents the same color as 0 degrees (red); this tool expects a value between 0 and 360.

What is the result when saturation (S) is 0%?

When saturation is 0%, the hue value has no effect at all, and the result is a shade of gray (R=G=B) that depends only on lightness.

Does 50% lightness with 100% saturation give the most vivid color?

Yes, at 50% lightness combined with 100% saturation, a color reaches its most vivid (most saturated) state; this combination is typical of pure colors like red, green, and blue.

Why do the resulting RGB values come out as decimals?

The HSL-to-RGB conversion formula is mathematical, so the result isn't always a whole number; display systems typically round these values to the nearest integer.

What color formats does this tool support?

This tool converts HSL (hue, saturation, lightness) input into RGB (red, green, blue) output, which you can use in image editors or the CSS rgb() function.

Related tools

Embed this tool on your site

<iframe src="https://pinfox.tech/en/tools/general/hsl-to-rgb-converter/?embed=1" width="100%" height="720" loading="lazy" style="border:0;border-radius:12px;overflow:hidden" title="HSL to RGB Color Converter - Pinfox"></iframe>