Free Tool
Hex to RGB Converter
Convert between HEX, RGB, and HSL color codes instantly with live preview.
#6366F1
HEX
#6366F1RGB
rgb(99, 102, 241)HSL
hsl(239, 84%, 67%)How to convert HEX to RGB
A HEX color code like #6366F1 is a three-pair hexadecimal number. Convert each pair from base-16 to base-10: 63 = 99, 66 = 102, F1 = 241. The result is rgb(99, 102, 241). This tool does the conversion instantly as you type.
Color format comparison
| Format | Syntax | Best For |
|---|---|---|
| HEX | #RRGGBB | CSS shorthand, design specs |
| RGB | rgb(R, G, B) | CSS, dynamic color manipulation |
| HSL | hsl(H, S%, L%) | Adjusting brightness, creating palettes |
Frequently Asked Questions
What is the difference between HEX and RGB?
HEX and RGB represent the same colors in different notations. HEX uses a 6-digit hexadecimal string (#FF0000), while RGB uses three decimal values from 0–255 (rgb(255, 0, 0)). Both define red, green, and blue channel intensities.
When should I use HSL instead of RGB?
HSL (Hue, Saturation, Lightness) is more intuitive for creating color variations. To make a color lighter, increase L. To desaturate, decrease S. This makes HSL ideal for generating consistent color palettes and themes.