ColorToolkits
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

  1. Enter or paste your RGB 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
  • 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

More Color Tools

View all tools →