RGB to HSL
Every color format describes the same thing in a different language: HEX for stylesheets, RGB for screens and code, HSL for building palettes, CMYK for print. Pick the conversion you need and get the exact value, a live preview and the formula behind it.
This color in every format
The same color written as HEX, RGB, HSL and CMYK. Copy any value.
RGB to HSL conversion
Every conversion first normalises RGB into an sRGB triplet — red, green and blue on a 0–255 scale — and then encodes that triplet as HSL. Both notations describe the same pixel, so the visible color does not change.
Read the input
Split the RGB value into its channels (hex digit pairs, numbers or percentages).
Normalise to sRGB
Scale each channel onto 0–255 so rounding differences do not accumulate.
Encode HSL
Write the result in HSL notation and copy it into your stylesheet or design tool.
Formula
rgb(255, 87, 51) → sRGB rgb(255,87,51) → HSL hsl(11, 100%, 60%)
Worked example
rgb(255, 87, 51) = #FF5733 = hsl(11, 100%, 60%)
Values are rounded to whole channels; convert back with the same tool to avoid drift.
RGB to HSL reference table
Common values converted with the same formula.
| Input (RGB) | Result (HSL) | |
|---|---|---|
rgb(255,87,51) | hsl(11, 100%, 60%) | |
rgb(79,70,229) | hsl(243, 75%, 59%) | |
rgb(46,204,113) | hsl(145, 63%, 49%) | |
rgb(52,152,219) | hsl(204, 70%, 53%) | |
rgb(231,76,60) | hsl(6, 78%, 57%) | |
rgb(25,174,153) | hsl(172, 75%, 39%) | |
rgb(155,89,182) | hsl(283, 39%, 53%) | |
rgb(243,156,18) | hsl(37, 90%, 51%) | |
rgb(52,73,94) | hsl(210, 29%, 29%) | |
rgb(233,31,99) | hsl(340, 82%, 52%) | |
rgb(0,0,0) | hsl(0, 0%, 0%) | |
rgb(255,255,255) | hsl(0, 0%, 100%) |