Online Calculators & Tools





RGB to HSL color conversion calculator

How to convert : Enter red, green and blue color levels (0..255) and press the Convert button:



Enter red color (R):
 
Enter green color (G):
 
Enter blue color (B):
 
   
 
Hue (H): °  
Saturation (S): %  
Lightness (L): %  
Color preview:  



What is RGB to HSL ?


HSL is another way to describe a color. Here we use Hue (the angle on the color wheel), Saturation (the amount of color/chroma) and Lightness (how bright the color is). RGB is used in many cases but sometimes it's a bit difficult to know what color you are describing just by looking at the numbers. R= 24, G= 98, B=118.


RGB to HSL conversion formula

The R,G,B values are divided by 255 to change the range from 0..255 to 0..1:

R' = R/255

G' = G/255

B' = B/255

Cmax = max(R', G', B')

Cmin = min(R', G', B')

Δ = Cmax - Cmin

 

Lightness calculation:

L = (Cmax + Cmin) / 2

 

Hue calculation:

 

Saturation calculation:

 

RGB to HSL color table

Color Color

name

Hex (R,G,B) (H,S,L)
  Black #000000 (0,0,0) (0°,0%,0%)
  White #FFFFFF (255,255,255) (0°,0%,100%)
  Red #FF0000 (255,0,0) (0°,100%,50%)
  Lime #00FF00 (0,255,0) (120°,100%,50%)
  Blue #0000FF (0,0,255) (240°,100%,50%)
  Yellow #FFFF00 (255,255,0) (60°,100%,50%)
  Cyan #00FFFF (0,255,255) (180°,100%,50%)
  Magenta #FF00FF (255,0,255) (300°,100%,50%)
  Silver #BFBFBF (191,191,191) (0°,0%,75%)
  Gray #808080 (128,128,128) (0°,0%,50%)
  Maroon #800000 (128,0,0) (0°,100%,25%)
  Olive #808000 (128,128,0) (60°,100%,25%)
  Green #008000 (0,128,0) (120°,100%,25%)
  Purple #800080 (128,0,128) (300°,100%,25%)
  Teal #008080 (0,128,128) (180°,100%,25%)
  Navy #000080 (0,0,128) (240°,100%,25%)