Hex to HSL Converter
Translate HEX codes into CSS HSL hue degrees, saturation percentages, and lightness percentages with instant adjustments.
How to Use This Tool
- Enter or paste your HEX value or choose one of the curated preset swatches.
- Copy the formatted HSL 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
- 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
HSL separates Hue angle (0–360) from lightness, letting you lighten hover states intuitively compared to opaque hex strings.
No; yellow hsl(60 100% 50%) looks far brighter than blue hsl(240 100% 50%). For uniform brightness across hues, consider OKLCH.
More Color Tools
View all tools →Color Converter
Convert single or bulk colors across HEX, RGB, HSL, OKLCH, P3, CMYK, and mobile formats.
Color Picker & Eyedropper
Pick exact colors in HEX, RGB, HSL, or OKLCH and sample pixels directly from your screen.
Tailwind Color Scale
Turn any brand color into a balanced 50–950 Tailwind scale with live contrast checks.
Contrast Checker
Check text and UI contrast against WCAG AA/AAA and APCA standards, with 1-click fixes.