HSL to HEX Color Converter

Convert HSL color values to HEX codes and RGB.

Why Use HSL for Color Design

HSL (Hue, Saturation, Lightness) is the most intuitive color model for design work. Hue is the color itself (0-360 degrees on the color wheel), saturation is how vivid it is (0% = grey, 100% = full color), and lightness is how bright or dark it is (0% = black, 100% = white). Adjusting these independently makes it easy to create color scales, hover states, and accessible contrast pairs.

Modern CSS supports hsl() and hsl(h s% l%) notation natively, so you often don't need to convert at all. But when you're working with design tools that output HEX codes, or JavaScript libraries that require HEX format, our converter translates HSL values to the standard 6-digit HEX and RGB equivalents.

Tailwind CSS v3 defines its color palette with specific HSL values. Tailwind v4 uses oklch() — a perceptually uniform color space that's even better for creating consistent-looking color scales. Understanding HSL is the gateway to understanding oklch.

Tips

  • To darken a color in HSL, reduce lightness by 10-20%. To create hover states, shift lightness by ±5-10%.
  • Complementary colors are 180 degrees apart on the hue wheel — easy to find with HSL by adding 180 to the hue.
  • CSS now supports color-mix(in hsl, red 50%, blue) for programmatic color blending without JavaScript.
  • For accessible text on backgrounds, keep lightness contrast at least 40-50 points between text and background in HSL.

Ready to get started?

Convert HSL to HEX

New tools every week

Get notified. No spam.