HEX to RGB Converter
Convert HEX color codes to RGB, HSL, HSV and approximate CMYK instantly with our free online color converter. Enter a three- or six-digit hexadecimal value to preview the color in real time, copy the format you need for CSS or digital design, and explore lighter tints and darker shades. No registration or additional software is required — all calculations take place directly in your browser.
Shades and Tints
Explore lighter and darker variations. Click any swatch to copy its HEX code.
How to convert HEX to RGB
Enter a three- or six-digit hexadecimal code. The RGB channels appear immediately. For example, #2F7DE1 becomes 47, 125, 225.
Copy the format you need for CSS, interface design or digital artwork. All calculations run locally in your browser.
Frequently Asked Questions
What is a HEX color code?
A hexadecimal color code represents red, green and blue channels using base-16 digits.
Can I enter a three-digit HEX code?
Yes. For example, #ABC expands to #AABBCC.
What is the difference between HEX and RGB?
Both represent the same RGB color using different notation.
Is CMYK exact?
No. This is a mathematical approximation. Print conversion depends on the ICC profile and printing conditions.
COLOR CONVERSION GUIDE
Understanding HEX and RGB Color Codes
Learn how digital colors are represented, how to convert hexadecimal values manually, and which notation works best for your next design or development project.
What is a HEX color code?
HEX is a compact way to represent red, green and blue intensities using hexadecimal digits (0–9 and A–F). In a six-digit code, the first pair represents red, the second green and the last blue. Each pair ranges from 00 to FF. Short codes such as #ABC expand to #AABBCC by repeating each digit.
What is RGB?
RGB is an additive color model used by digital displays. Each channel typically has an integer value between 0 and 255 in 8-bit notation. Combining three channels produces a color: zero in all channels gives black, while 255 in all three gives white.
How HEX to RGB conversion works
Remove the hash sign and split the six digits into three pairs. Convert each pair from base 16 to base 10 using the formula (first digit × 16) + second digit. The letters A through F represent the decimal values 10 through 15.
Red: 2F
2 × 16 + 15 = 47
Green: 7D
7 × 16 + 13 = 125
Blue: E1
14 × 16 + 1 = 225
#2F7DE1 = rgb(47, 125, 225)
Common HEX and RGB color codes
Use this reference table to compare familiar colors in both formats. These examples use standard 8-bit RGB values.
| Color | HEX | RGB |
|---|---|---|
| Black | #000000 | 0, 0, 0 |
| White | #FFFFFF | 255, 255, 255 |
| Red | #FF0000 | 255, 0, 0 |
| Green | #00FF00 | 0, 255, 0 |
| Blue | #0000FF | 0, 0, 255 |
| Yellow | #FFFF00 | 255, 255, 0 |
| Cyan | #00FFFF | 0, 255, 255 |
| Magenta | #FF00FF | 255, 0, 255 |
| Gray | #808080 | 128, 128, 128 |
| VectorElements Green | #8AE749 | 138, 231, 73 |
When should you use HEX or RGB?
HEX for design systems
Use compact hexadecimal notation when documenting brand colors, sharing palettes or defining solid colors in CSS. It is convenient for transferring a specific color between design tools and websites.
RGB for channel-level control
Choose RGB when adjusting individual channel intensities, working with image data or writing CSS that uses channel values and opacity. For example, rgb(47 125 225 / 50%) specifies a translucent version of the same blue.
What about HSL, HSV and CMYK?
HSL describes hue, saturation and lightness, making it useful for exploring color variations. HSV uses value instead of lightness and is common in color pickers. CMYK describes cyan, magenta, yellow and black ink. The CMYK result in this converter is a mathematical approximation, not a color-managed print conversion. For production printing, use the appropriate ICC profile.
Need to convert RGB to HEX?
Use the reverse converter to turn red, green and blue channel values into a hexadecimal code.
RGB to HEX Converter →