Hex to RGB Converter
Hex to RGB Conversion
It is a color conversion calculator that converts the hex color code to red, green and blue colors (RGB). It has a single text field and two active controls; the ‘Convert' and ‘Reset' buttons. Below the controls is a result panel that highlights the outcomes of red, green and blue colors. It also gives the CSS color and the color preview of the converted hex color code.
The hex code uses both numbers and letters to determine the color preview. The first procedure when using the calculator is to enter 6 digits hex color code and then press the ‘Convert' button. Use the ‘Reset' button to readjust the calculator if you want to carry out new conversions. It is used to erase all data of the previous conversions from the calculator.
Example
Convert 547898 hex color code to RGB.
Solution
First, enter the 6 digits hex color code (547898) in the blank text field and then click the ‘Convert' button. The results of the conversion will be;
Red Color (R) – 84
Green Color (G) – 120
Blue color (B) – 152
CSS color: - RGB (84, 120, 152)
The color preview of the converted hex color code is shown in the bottom panel of the calculator. The Hex to RGB color table can be used to determine the hex color code of the common colors.
Formula used in converting hex to RGB
To get the red color level, we take the 2 left digits of the hex color code and convert to a decimal value.
To get the green color level, we take the 2 middle digits of the hex color code and convert to a decimal value.
To get the blue color level, we take the 2 right digits of the hex color code and convert to a decimal value.
Example
Convert gold hex color code FFD700 to RGB color:
Hex = FFD700
So the RGB colors are:
R = FF16 = 25510
G = D716 = 21510
B = 0016 = 010
RGB = (255, 215, 0)