How to use the HEX to RGB Converter
- Type a hex code (#3b82f6 or #fff) or RGB values (59, 130, 246).
- Or use the colour picker.
- Copy the format you need.
How it works
Each pair of hex digits is a base-16 number from 0–255 for red, green and blue. HSL is derived from the max and min RGB channels.
Worked examples
#3b82f6
3b = 59, 82 = 130, f6 = 246 → rgb(59, 130, 246) → hsl(217, 91%, 60%).
Limitations and assumptions
- Alpha (transparency) channels aren't converted.
Frequently asked questions
What is a 3-digit hex code?
Shorthand where each digit is doubled: #fa0 = #ffaa00.
G
Built and reviewed by Guru G
Calculation logic is covered by automated tests against known values. Last reviewed Nov 6, 2026. Found a problem? Let us know — see our editorial policy.