HEX to RGB Converter
Convert HEX color codes to RGB values, supports 3-digit and 6-digit formats
How to Use
- Enter a HEX color code in the input field (e.g. #FF0000 or #F00)
- The tool instantly converts and displays the corresponding R, G, B values
- Click the "Copy" button to copy the rgb() formatted color code
- You can also click the common color shortcut buttons below for quick selection
FAQ
What is a HEX color code?
A HEX color code represents colors using hexadecimal notation in the format #RRGGBB, where RR, GG, BB represent the red, green, and blue color channels respectively, ranging from 00-FF (decimal 0-255). There's also a shorthand #RGB format where each digit is expanded to two (e.g. #F00 = #FF0000).
What's the difference between HEX and RGB?
HEX and RGB essentially represent the same color, just in different formats. HEX uses hexadecimal (e.g. #3B82F6), while RGB uses decimal (e.g. rgb(59, 130, 246)). HEX is commonly used in HTML/CSS, while RGB is more intuitive in graphic design and CSS functions.
Why does my color code show as invalid?
Please verify the format: a HEX code should be # followed by 3 or 6 hexadecimal characters (0-9, A-F). For example, #FFF and #ffffff are both valid. Make sure there are no spaces or special characters.