Hex to RGB Converter
Convert between Hex, RGB, and HSL color formats. Bidirectional conversion with live color preview and one-click copy.
Quick Answer
Hex to RGB: split the 6-digit hex into 3 pairs and convert each from base-16 to base-10. #FF5733 = rgb(255, 87, 51). Each pair represents Red, Green, Blue channels (0-255).
#3B82F6rgb(59, 130, 246)hsl(217, 91%, 60%)Red: 59 (23.1%)
Green: 130 (51.0%)
Blue: 246 (96.5%)
Hue: 217 | Saturation: 91% | Lightness: 60%
About This Tool
The Hex to RGB Converter is a bidirectional color format converter for designers and developers. Enter a hex code to see its RGB and HSL equivalents, or enter RGB values to get the hex code. The live color preview helps verify you have the right color before copying it into your code.
Color Format Guide
Hex codes are the most compact representation, using just 6 characters. RGB is the native format for screens and is useful when you need to manipulate individual channels programmatically. HSL is the most human-friendly format, letting you easily adjust hue (color), saturation (vividness), and lightness (brightness) independently.
CSS Color Usage
Modern CSS supports all three formats: hex (#3B82F6), rgb(59, 130, 246), and hsl(217, 91%, 60%). All render identically. CSS also supports transparency via rgba() and hsla(), or 8-digit hex. Choose the format that best fits your workflow and team conventions.
Frequently Asked Questions
How do you convert hex to RGB?
What is the difference between hex and RGB?
What is HSL color?
When should I use hex vs RGB vs HSL?
What does the # symbol mean in hex colors?
Was this tool helpful?