XhCode Online Converter Tools

HEX TO RGB

Hex:

R: G: B:
#
R
G
B
H
S
B
OK
HEX to RGB

Converting HEX to RGB is a simple process where you extract the Red, Green, and Blue components from the 6-digit HEX code.

Steps to Convert HEX to RGB:
Split the HEX Code:
A HEX color code is typically in the form of #RRGGBB, where:

RR represents the Red component (2 digits)
GG represents the Green component (2 digits)
BB represents the Blue component (2 digits)
Convert each pair from HEX to Decimal:
Each pair of HEX digits needs to be converted into a decimal number (range 0-255).

For example, if the HEX code is #FF5733:

FF (Red) → Convert FF from hex to decimal: FF = 255
57 (Green) → Convert 57 from hex to decimal: 57 = 87
33 (Blue) → Convert 33 from hex to decimal: 33 = 51
Combine the RGB values:
After converting the HEX components to decimal, you will get the RGB value.

Example 1: HEX #FF5733
Split the HEX code:

Red: FF
Green: 57
Blue: 33
Convert HEX to Decimal:

FF (Hex) = 255 (Decimal)
57 (Hex) = 87 (Decimal)
33 (Hex) = 51 (Decimal)
RGB = (255, 87, 51)

Example 2: HEX #33CCFF
Split the HEX code:

Red: 33
Green: CC
Blue: FF
Convert HEX to Decimal:

33 (Hex) = 51 (Decimal)
CC (Hex) = 204 (Decimal)
FF (Hex) = 255 (Decimal)
RGB = (51, 204, 255)

Example 3: HEX #800080
Split the HEX code:

Red: 80
Green: 00
Blue: 80
Convert HEX to Decimal:

80 (Hex) = 128 (Decimal)
00 (Hex) = 0 (Decimal)
80 (Hex) = 128 (Decimal)
RGB = (128, 0, 128)