Format Converter
RGB to HSL Converter
Convert RGB channel integers (0–255) into clean CSS HSL hue, saturation, and lightness percentages.
Converted (HSL)
hsl(160.1 84.1% 39.4%)
#10B981
Try presets:
How to Use This Tool
- Enter or paste your RGB 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
- Dividing each RGB byte by 255 places channels on [0, 1]. Hue derives from the dominant channel offset divided by chroma (M - m).
- Instant clipboard feedback with live OKLCH and Display-P3 gamut safety
- Zero server round-trips—every calculation executes immediately in browser memory
Max/Min Chroma normalization from RGB to HSL
Dividing each RGB byte by 255 places channels on [0, 1]. Hue derives from the dominant channel offset divided by chroma (M - m).
Reference Snippet (CSS)
color: hsl(160.1 84.1% 39.4%);Frequently Asked Questions
When R, G, and B are equal (neutral grays), chroma is 0 and Hue defaults to 0 degrees.
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