HEX to RGB color value table
Here’s a detailed color table with hexadecimal (HEX) values and their corresponding RGB equivalents. The table covers a range of colors commonly used in design and development.
Color Name | HEX Code | RGB Values |
---|---|---|
Black | #000000 | rgb(0, 0, 0) |
White | #FFFFFF | rgb(255, 255, 255) |
Red | #FF0000 | rgb(255, 0, 0) |
Green | #00FF00 | rgb(0, 255, 0) |
Blue | #0000FF | rgb(0, 0, 255) |
Yellow | #FFFF00 | rgb(255, 255, 0) |
Cyan | #00FFFF | rgb(0, 255, 255) |
Magenta | #FF00FF | rgb(255, 0, 255) |
Gray | #808080 | rgb(128, 128, 128) |
Dark Gray | #A9A9A9 | rgb(169, 169, 169) |
Light Gray | #D3D3D3 | rgb(211, 211, 211) |
Orange | #FFA500 | rgb(255, 165, 0) |
Purple | #800080 | rgb(128, 0, 128) |
Pink | #FFC0CB | rgb(255, 192, 203) |
Brown | #A52A2A | rgb(165, 42, 42) |
Gold | #FFD700 | rgb(255, 215, 0) |
Navy | #000080 | rgb(0, 0, 128) |
Olive | #808000 | rgb(128, 128, 0) |
Teal | #008080 | rgb(0, 128, 128) |
Maroon | #800000 | rgb(128, 0, 0) |
HEX to RGB conversion
Use our tool to effortlessly convert HEX codes to RGB values. Here’s how it works on a technical level:
- The first two digits of your HEX color code are converted into a decimal value to determine the red color level.
- The middle two digits of your HEX color code are converted into a decimal value to determine the green color level.
- The last two digits of your HEX color code are converted into a decimal value to determine the blue color level.
Understanding the HEX Format
A HEX color code consists of 6 characters, usually in the form #RRGGBB
. Each pair of characters represents one of the color components: red, green, and blue. The characters range from 0-9
and A-F
, which correspond to the decimal values 0-15
. For example:
#FF5733
means:FF
for red,57
for green,33
for blue.
Break Down the HEX Code
The HEX code is divided into three parts:
- The first two characters (
RR
) represent the red color component. - The middle two characters (
GG
) represent the green color component. - The last two characters (
BB
) represent the blue color component.
For example, for #FF5733
:
- Red:
FF
- Green:
57
- Blue:
33
Convert HEX to Decimal
Each HEX pair is converted from hexadecimal (base 16) to decimal (base 10). This is done by multiplying each digit by the corresponding power of 16 and summing the result. For a pair like FF
, you calculate it as:
F
in HEX = 15 in decimal, soFF
= (15 × 16^1) + (15 × 16^0) = 240 + 15 = 255 (Red value).
Similarly:
57
in HEX = (5 × 16^1) + (7 × 16^0) = 80 + 7 = 87 (Green value).33
in HEX = (3 × 16^1) + (3 × 16^0) = 48 + 3 = 51 (Blue value).
Resulting RGB Values
So, #FF5733
converts to the RGB value rgb(255, 87, 51)
.
General Conversion Steps:
- Extract the red, green, and blue HEX values from the HEX color code.
- Convert each HEX pair to its decimal equivalent using the formula:
decimal = (first_digit × 16) + second_digit
- The result gives you the RGB values, which are used for color representation in digital formats.
Example Conversion
- HEX:
#A52A2A
- Red:
A5
(HEX) = 165 (decimal) - Green:
2A
(HEX) = 42 (decimal) - Blue:
2A
(HEX) = 42 (decimal) - RGB:
rgb(165, 42, 42)
This is how the color #A52A2A
(brown) is converted into rgb(165, 42, 42)
.
About our HEX to RGB converter
What is a HEX to RGB converter?
A HEX to RGB converter is an online tool that transforms HEX color codes into their corresponding RGB values. It helps designers, developers, and anyone working with colors to seamlessly switch between color formats.
Why should I use a HEX to RGB converter?
A HEX to RGB converter is essential for ensuring color consistency across platforms and formats. It’s especially useful when working with web design, graphic design, or programming tasks that require precise color management.
How does the HEX to RGB converter work?
Simply enter your HEX color code into the tool, and it will instantly calculate the equivalent RGB values. This saves time and eliminates errors compared to manual conversion.
Can I use the tool for free?
Yes, our HEX to RGB converter is completely free. Use it anytime to convert colors quickly and without any restrictions.