G
GamutDesk

RGB to HSL Technical Converter

Calculate extreme channel values max(R,G,B) and min(R,G,B) to map RGB coordinates to cylindrical Hue, Saturation, and Lightness.

100% Client-SideZero Data Collection
RGB Input Channels (0 - 255)
Red (R)
Green (G)
Blue (B)
max(R,G,B)0.922
min(R,G,B)0.145
Delta (Chroma)0.776
Target Hue
hsl(221, 83%, 53%)
CSS HSL String
hsl(221, 83%, 53%)
Hue (Angle)221°
Saturation83%
Lightness53%

Technical Specification & Mathematical Principles

Channels are scaled to [0.0, 1.0]. Extremes are identified: max = max(r, g, b), min = min(r, g, b), and Δ = max - min.

Lightness is L = (max + min) / 2. Saturation is S = Δ / (1 - |2L - 1|) if Δ ≠ 0, otherwise 0.

Frequently Asked Questions

The maximum and minimum channel values establish both the lightness midpoint L = (max + min) / 2 and the chroma span delta = max - min. If delta is 0, the color is completely achromatic (gray).

Related Design & Color Instruments