HSL to RGB Converter

Convert HSL colors to RGB, with hex, OKLCH and CMYK values alongside.

Enter a valid HSL value, like hsl(25, 95%, 53%)

  • RGB
  • Hex
  • OKLCH
  • CMYK

How HSL to RGB conversion works

Lightness and saturation set how far the channels spread, and hue decides which channel is highest. CSS uses this formula:

a = S × min(L, 1 − L)
f(n) = L − a × max(−1, min(k − 3, 9 − k, 1))
  where k = (n + H ÷ 30) mod 12
R = f(0), G = f(8), B = f(4), each × 255

For hsl(25, 95%, 53%) that gives rgb(249, 116, 21), a bright orange.

Common colors in RGB

ColorHSLRGB
Whitehsl(0, 0%, 100%)rgb(255, 255, 255)
Blackhsl(0, 0%, 0%)rgb(0, 0, 0)
Redhsl(0, 100%, 50%)rgb(255, 0, 0)
Orangehsl(39, 100%, 50%)rgb(255, 165, 0)
Yellowhsl(60, 100%, 50%)rgb(255, 255, 0)
Greenhsl(120, 100%, 25%)rgb(0, 128, 0)
Bluehsl(240, 100%, 50%)rgb(0, 0, 255)
Purplehsl(300, 100%, 25%)rgb(128, 0, 128)
Pinkhsl(350, 100%, 88%)rgb(255, 192, 203)
Grayhsl(0, 0%, 50%)rgb(128, 128, 128)

Questions

How do I convert HSL to RGB?

Type the hue, saturation and lightness above, like 25, 95%, 53% or hsl(25 95% 53%). The RGB value updates as you type.

What ranges do HSL values use?

Hue is an angle from 0 to 360, where 0 is red, 120 is green and 240 is blue. Saturation and lightness are percentages from 0 to 100.

Why do I get slightly different RGB values elsewhere?

HSL values are usually rounded to whole numbers, so the same HSL can land a channel or two apart between tools. The difference isn't visible.

Can I use HSL directly in CSS?

Yes. Every browser supports hsl(). You only need RGB or hex when a design tool, email template or older codebase asks for it.

More free tools

Landings
Landing Page Examples
Copyright © 2026. All rights reserved.