ColorToolkits
Format Converter

Hex to HSL Converter

Translate HEX codes into CSS HSL hue degrees, saturation percentages, and lightness percentages with instant adjustments.

Converted (HSL)
hsl(349.7 89.2% 60.2%)
#F43F5E
Try presets:

How to Use This Tool

  1. Enter or paste your HEX value or choose one of the curated preset swatches.
  2. Copy the formatted HSL 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
  • Channels normalize to [0, 1]. Lightness equals the midpoint of min and max RGB; chroma (max - min) determines Saturation and sets the 60-degree Hue sector.
  • Instant clipboard feedback with live OKLCH and Display-P3 gamut safety
  • Zero server round-trips—every calculation executes immediately in browser memory

Mapping sRGB bytes to cylindrical HSL

Channels normalize to [0, 1]. Lightness equals the midpoint of min and max RGB; chroma (max - min) determines Saturation and sets the 60-degree Hue sector.

Reference Snippet (CSS / Usage)

:root {
  --accent-h: 350;
  --accent-s: 89%;
  --accent-l: 60%;
  --accent: hsl(var(--accent-h) var(--accent-s) var(--accent-l));
}

Frequently Asked Questions

More Color Tools

View all tools →