To convert HEX to RGB: split the 6-digit hex code into three pairs, convert each pair from hexadecimal to decimal. Example: #FF6B9D → FF=255, 6B=107, 9D=157 → RGB(255, 107, 157). To convert RGB to HEX: convert each decimal value to hex and combine with # prefix. RGB(255, 107, 157) → #FF6B9D.
📂 Developer Tools
🎨 HEX to RGB Color Converter
Convert HEX color codes to RGB and RGB to HEX instantly. Also converts to HSL. Essential for web designers, developers, and anyone working with digital colors.
✏️ Enter Your Values
✨ Your Result
🦉Owl's Explanation
🎨
Fill in the values above and click Calculate ✨
✅ Trusted Tool
The 365tool.net Color Converter uses standard hexadecimal and color space mathematics. Free for web designers, front-end developers, and digital artists worldwide. No sign-up needed.
🤔 How Does This Work?
HEX to RGB conversion uses base-16 mathematics:
Split 6-digit HEX into three pairs: RR, GG, BB
Convert each pair from hexadecimal to decimal (parseInt(hex, 16))
For RGB to HEX: convert each decimal to hex using toString(16)
HSL calculation uses the standard RGB-to-HSL formula from color theory
❓ Frequently Asked Questions
What is the difference between HEX and RGB?▼
Both represent the same colors in different formats. RGB uses three decimal numbers 0-255 for Red, Green, Blue. HEX uses a 6-digit hexadecimal code where each pair represents R, G, B in base 16. #FF0000 = RGB(255,0,0) = pure red. Web developers use HEX in CSS (#ff6b9d), while design software often uses RGB values.
What is HSL color?▼
HSL stands for Hue, Saturation, Lightness. Hue is the color type (0-360°, like a color wheel). Saturation is color intensity (0% grey to 100% vivid). Lightness is brightness (0% black to 100% white). HSL is more intuitive for designers — you can easily make a color lighter by adjusting Lightness, or more muted by reducing Saturation.
What does # mean in HEX colors?▼
The # symbol simply indicates that what follows is a hexadecimal color code, not a regular number. HEX uses base 16, so digits are 0-9 and A-F. Each channel (R, G, B) uses 2 hex digits: 00 (0 in decimal) to FF (255 in decimal). Shorthand: #RGB where #F9A = #FF99AA.
What are common HEX color codes?▼
White: #FFFFFF, Black: #000000, Red: #FF0000, Green: #008000, Blue: #0000FF, Yellow: #FFFF00, Orange: #FFA500, Pink: #FFC0CB, Purple: #800080, Grey: #808080. Pure colors have FF in one channel and 00 in others.
Can I use 3-digit HEX codes?▼
Yes! A 3-digit HEX shorthand works when each pair has matching digits. #RGB expands to #RRGGBB. So #F9A = #FF99AA, #000 = #000000, #FFF = #FFFFFF, #F00 = #FF0000. Our converter accepts both formats.
Both represent the same colors in different formats. RGB uses three decimal numbers 0-255 for Red, Green, Blue. HEX uses a 6-digit hexadecimal code where each pair represents R, G, B in base 16. #FF0000 = RGB(255,0,0) = pure red. Web developers use HEX in CSS (#ff6b9d), while design software often uses RGB values.
What is HSL color?▼
HSL stands for Hue, Saturation, Lightness. Hue is the color type (0-360°, like a color wheel). Saturation is color intensity (0% grey to 100% vivid). Lightness is brightness (0% black to 100% white). HSL is more intuitive for designers — you can easily make a color lighter by adjusting Lightness, or more muted by reducing Saturation.
What does # mean in HEX colors?▼
The # symbol simply indicates that what follows is a hexadecimal color code, not a regular number. HEX uses base 16, so digits are 0-9 and A-F. Each channel (R, G, B) uses 2 hex digits: 00 (0 in decimal) to FF (255 in decimal). Shorthand: #RGB where #F9A = #FF99AA.
What are common HEX color codes?▼
White: #FFFFFF, Black: #000000, Red: #FF0000, Green: #008000, Blue: #0000FF, Yellow: #FFFF00, Orange: #FFA500, Pink: #FFC0CB, Purple: #800080, Grey: #808080. Pure colors have FF in one channel and 00 in others.
Can I use 3-digit HEX codes?▼
Yes! A 3-digit HEX shorthand works when each pair has matching digits. #RGB expands to #RRGGBB. So #F9A = #FF99AA, #000 = #000000, #FFF = #FFFFFF, #F00 = #FF0000. Our converter accepts both formats.