Hex to RGB Converter
Hex to RGB Converter
Convert HEX color codes to RGB, HSL, and more — instantly and free.
🎨 Convert HEX
What Is HEX to RGB Conversion?
HEX to RGB conversion means translating a hexadecimal color code (like #4F46E5) into its red, green, and blue component values (like 79, 70, 229). Both formats describe the same color — just in different ways.
How HEX Works
A HEX code is 6 characters long (or 3 in shorthand). Each pair of characters represents one color channel in hexadecimal:
- #4F46E5
- First pair: 4F = Red = 79
- Second pair: 46 = Green = 70
- Third pair: E5 = Blue = 229
- Result: rgb(79, 70, 229)
Conversion Formula
G = parseInt(hex.substring(2,4), 16)
B = parseInt(hex.substring(4,6), 16)
Why Use Our Converter?
Our tool is fast, accurate, and free. It handles both 6-digit and 3-digit hex codes, shows RGB and HSL, calculates luminance, and even recommends the best text color to use on top of the background.
Key Features
- 🎨 Convert HEX to RGB, HSL, and more
- ⚡ Instant live preview swatch
- 🎯 Best text color recommendation
- 📋 Copy RGB result
- ✅ Handles both #RRGGBB and #RGB formats
- 🔐 100% private — nothing leaves your browser
Common HEX to RGB Values
Perfect For
❓ Frequently Asked Questions
What is HEX to RGB conversion?
It’s the process of converting a hexadecimal color code (like #FF0000) into its red, green, blue values (like 255, 0, 0).
Is this Hex to RGB Converter free?
Yes, 100% free with no signup and no usage limits.
What is #4F46E5 in RGB?
