Format Converter
HSL to RGB Converter
Convert CSS HSL (Hue, Saturation, Lightness) coordinates into decimal 0–255 RGB channel integers and CSS Color 4 syntax.
Converted (RGB)
rgb(36 99 235)
#2463EB
Try presets:
How to Use This Tool
- Enter or paste your HSL value or choose one of the curated preset swatches.
- Copy the formatted RGB value directly, or inspect the secondary HEX, RGB, HSL, and OKLCH chips below.
- Click into Tailwind Scale Generator or Contrast Checker to validate accessibility on the converted shade.
Key Features
- Bidirectional parsing supporting CSS Color Level 4 syntax cleanly
- HSL computes chroma C = (1 - |2L - 1|) × S, splits Hue modulo 60° sectors into intermediate X, and offsets RGB by lightness floor m = L - C/2.
- Instant clipboard feedback with live OKLCH and Display-P3 gamut safety
- Zero server round-trips—every calculation executes immediately in browser memory
Projecting Cylindrical HSL to Cartesian RGB
HSL computes chroma C = (1 - |2L - 1|) × S, splits Hue modulo 60° sectors into intermediate X, and offsets RGB by lightness floor m = L - C/2.
Reference Snippet (JavaScript)
function hslToRgb(h, s, l) {
s /= 100; l /= 100;
const k = (n) => (n + h / 30) % 12;
const a = s * Math.min(l, 1 - l);
const f = (n) => l - a * Math.max(-1, Math.min(k(n) - 3, 9 - k(n), 1));
return [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];
}Frequently Asked Questions
Yes, both modern hsl(221deg 83% 53%) and legacy comma-separated hsl(221, 83%, 53%) parse identically.
More Color Tools
View all tools →Color Converter
Convert single or bulk colors across HEX, RGB, HSL, OKLCH, P3, CMYK, and mobile formats.
Open tool
Color Picker & Eyedropper
Pick exact colors in HEX, RGB, HSL, or OKLCH and sample pixels directly from your screen.
Open tool
Tailwind Color Scale
Turn any brand color into a balanced 50–950 Tailwind scale with live contrast checks.
Open tool
Contrast Checker
Check text and UI contrast against WCAG AA/AAA and APCA standards, with 1-click fixes.
Open tool