Format Converter
HSL to Hex Converter
Convert CSS HSL values (Hue, Saturation, Lightness) into clean HEX codes for design tools and cross-platform UI tokens.
Converted (HEX)
#3c83f6
#3C83F6
Try presets:
How to Use This Tool
- Enter or paste your HSL value or choose one of the curated preset swatches.
- Copy the formatted HEX 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 converts chroma C = (1 - |2L - 1|) * S along the six 60-degree segments of the hue hexagon before scaling back into 8-bit hex.
- Instant clipboard feedback with live OKLCH and Display-P3 gamut safety
- Zero server round-trips—every calculation executes immediately in browser memory
Inverse HSL to RGB byte transformation
HSL converts chroma C = (1 - |2L - 1|) * S along the six 60-degree segments of the hue hexagon before scaling back into 8-bit hex.
Reference Snippet (JavaScript)
// Supported CSS Color 4 input examples:
// hsl(217 91% 60%)
// hsl(217, 91%, 60%)Frequently Asked Questions
Yes, both modern CSS space syntax hsl(217 91% 60%) and comma syntax hsl(217, 91%, 60%) parse cleanly.
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