Convert HSL to RGB

Convert HSL colors to RGB values. Transform hue, saturation, lightness to red, green, blue channels. Free online converter.

Formula: H (0-360°), S (0-100%), L (0-100%) → R, G, B (0-255)

Quick example: hsl(217, 82%, 53%) → rgb(37, 99, 235)

Color Preview
#2563EB
Color Values
#
HEX
R
RGB
H
HSL
C
CMYK84%, 58%, 0%, 8%
A
Alpha
100%
T
Tailwind
blue-600#2563ebclose match
WCAG Contrast Checker
Foreground#2563eb
Background#ffffff
Contrast Ratio
5.17:1
Sample Text Preview
AA Large: PassAA Normal: PassAAA: Fail
Analogous Palette

About This Conversion

Converting HSL to RGB is needed when working with APIs, canvas operations, or libraries that require RGB input. While HSL is excellent for human color selection and palette generation, most rendering systems ultimately work with RGB values. This conversion takes the perceptual hue/saturation/lightness model and calculates the specific red, green, and blue channel intensities (0-255) needed to reproduce that color on screen. The algorithm handles all edge cases including achromatic colors (zero saturation = grayscale).

Frequently Asked Questions

Why convert HSL back to RGB?
Many APIs (Canvas, WebGL, image processing) require RGB values. CSS supports both, but JavaScript color manipulation often works with RGB arrays internally.
Do HSL and RGB produce the same colors?
Yes. They're different representations of the same color space. Any color expressible in HSL has an exact RGB equivalent, and vice versa.
What happens to grayscale colors in this conversion?
When saturation is 0%, the hue is irrelevant and R=G=B, determined solely by lightness. hsl(any, 0%, 50%) = rgb(128, 128, 128).

Related Color Conversions