RGB to HSL Color Converter
Instantly convert Red, Green, Blue (RGB) to Hue, Saturation, Lightness (HSL) color codes. Enter any RGB value and get the HSL equivalent in real time — no signup required.
Color Preview
#6366F1
All formats
#6366F1
hsl(239, 84%, 67%)
cmyk(59%, 58%, 0%, 5%)
RGB vs HSL — What's the Difference?
RGB
Red, Green, Blue
Three integer values (0–255) for red, green, and blue light. The native color model for screens, monitors, and digital displays.
Example: color: rgb(99, 102, 241)
HSL
Hue, Saturation, Lightness
Hue (0–360°), Saturation (0–100%), and Lightness (0–100%). Designed to be intuitive for humans — great for adjusting color tones in CSS.
Example: color: hsl(239, 84%, 67%)
How to Convert RGB to HSL
All conversion math runs in your browser using the sRGB color space. No data is sent to a server.
Common Colors — RGB to HSL Reference Table
| Color | RGB | HSL |
|---|---|---|
| Red | rgb(255, 0, 0) | hsl(0, 100%, 50%) |
| Green | rgb(0, 128, 0) | hsl(120, 100%, 25%) |
| Blue | rgb(0, 0, 255) | hsl(240, 100%, 50%) |
| White | rgb(255, 255, 255) | hsl(0, 0%, 100%) |
| Black | rgb(0, 0, 0) | hsl(0, 0%, 0%) |
| Orange | rgb(255, 165, 0) | hsl(39, 100%, 50%) |
| Purple | rgb(128, 0, 128) | hsl(300, 100%, 25%) |
| Yellow | rgb(255, 255, 0) | hsl(60, 100%, 50%) |
| Cyan | rgb(0, 255, 255) | hsl(180, 100%, 50%) |
| Magenta | rgb(255, 0, 255) | hsl(300, 100%, 50%) |
| Gray | rgb(128, 128, 128) | hsl(0, 0%, 50%) |
| Pink | rgb(255, 192, 203) | hsl(350, 100%, 88%) |
Related Color Converters
Frequently Asked Questions
How do I convert RGB to HSL?
To convert RGB to HSL: L = (max + min) / 2 | S = (max − min) / (1 − |2L − 1|) | H = 60° × sector offset. Use the converter above to do this instantly for any color value.
What is the RGB color format?
Red, Green, Blue (RGB) — Three integer values (0–255) for red, green, and blue light. The native color model for screens, monitors, and digital displays.
What is the HSL color format?
Hue, Saturation, Lightness (HSL) — Hue (0–360°), Saturation (0–100%), and Lightness (0–100%). Designed to be intuitive for humans — great for adjusting color tones in CSS.
Is this RGB to HSL converter free?
Yes. It is completely free, works in your browser with no signup or upload. All color math runs locally.
Can I convert HSL back to RGB?
Yes — use the swap button in the converter above, or visit the HSL to RGB converter page directly.