JESUS CHRIST IS THE ONLY TRUE GOD
Conversion calculator

HEX to RGB Calculator

Convert a CSS-style hexadecimal color to red, green and blue channels.

Your calculationPrivate in your browser
Report a result

Start with a worked example

Open the worked example for RGB. The example starts with HEX color = #0022E1.

HEX to RGB Calculator formula

#RRGGBB stores each 8-bit RGB channel as two hexadecimal digits.

Inputs and units

Inputs and example values for HEX to RGB Calculator
InputFormat / rangeExample
HEX colorFollow the input format above#0022E1

Worked example

The values listed in Inputs and units give rgb(0, 34, 225) for RGB.

RGB
rgb(0, 34, 225)
Red
0
Green
34
Blue
225

Results and assumptions

The result details report Red, Green, Blue for the same inputs as the main answer.

Fix an input or unexpected result

See how to check a result or report an issue.