HEX to RGB Converter

Convert HEX color codes to RGB format with this free online tool

🎨 HEX to RGB

HEX to RGB Converter

Convert hexadecimal color codes to RGB color values

Enter a HEX color code with or without the # symbol (e.g., #4287f5 or 4287f5)

rgb(66, 135, 245)
R: 66
G: 135
B: 245

About HEX to RGB Conversion

Understanding the conversion between HEX and RGB color formats

What is HEX Color Format?

HEX (hexadecimal) is a color format commonly used in web design and CSS. It represents colors using a combination of 6 hexadecimal digits:

• The first two digits represent the red component (00-FF)

• The middle two digits represent the green component (00-FF)

• The last two digits represent the blue component (00-FF)

For example, #4287f5 represents a blue color.

What is RGB Color Format?

RGB (Red, Green, Blue) is an additive color model used in digital displays. It represents colors as a combination of three values:

• Red: 0-255

• Green: 0-255

• Blue: 0-255

For example, rgb(66, 135, 245) represents the same blue color as #4287f5.

How HEX to RGB Conversion Works

Converting from HEX to RGB involves these steps:

1. Split the HEX code into three pairs (excluding the # symbol)

2. Convert each pair from base-16 (hexadecimal) to base-10 (decimal)

3. The resulting three decimal numbers are the RGB values

For example, #4287f5 converts to rgb(66, 135, 245):

• 42 in hex = 66 in decimal (Red)

• 87 in hex = 135 in decimal (Green)

• f5 in hex = 245 in decimal (Blue)