Enter HEX Color:
Note: This tool converts HEX color codes to RGB/RGBA format.
About HEX to RGB Converter
This tool converts HEX color codes to RGB (Red, Green, Blue) format. HEX codes are commonly used in web design, while RGB values are used in various programming and design applications.
How to Use This Converter
Step-by-Step Guide:
- Step 1: Enter the HEX color value (e.g. #ff0000 or #f00)
- Step 2: Click "Convert to RGB" to see results
- Step 3: View the color preview and RGB values
- Step 4: Copy or clear results as needed
Conversion Formula:
HEX to RGB conversion involves splitting the HEX code into its red, green, and blue components:
- 6-digit HEX: #RRGGBB → rgb(RR, GG, BB)
- 3-digit HEX: #RGB → rgb(RR, GG, BB) where RR = R*17, GG = G*17, BB = B*17
Each pair of HEX digits represents a decimal value from 0 to 255.
Example Conversions:
Input: #ff0000 → Output: rgb(255, 0, 0) Input: #00ff00 → Output: rgb(0, 255, 0) Input: #0000ff → Output: rgb(0, 0, 255) Input: #f00 → Output: rgb(255, 0, 0) Input: #0f0 → Output: rgb(0, 255, 0) Input: #00f → Output: rgb(0, 0, 255)