ColorToolkits
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

  1. Enter or paste your HSL value or choose one of the curated preset swatches.
  2. Copy the formatted HEX value directly, or inspect the secondary HEX, RGB, HSL, and OKLCH chips below.
  3. 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

More Color Tools

View all tools →