When developing web pages and working with image editing software, it is generally helpful to be able to convert color codes from one format to another. This web application can be used as a tool to do those conversions. Feel free to share and/or bookmark this page.

## HEX to RGB

You may be wondering how to convert a color code expressed in a Hexadecimal (Hex) format to a numeric RGB (Red, Green, Blue) value. With a little bit of math, we can easily perform those conversions. The Hex format is written as RRGGBB (hex triplet) where each place (total of 6) can hold values of 0-F. We then need to convert each set of two places to a Base10 (decimal) number. The number of colors that can be represented by this system is 256 × 256 × 256 (256 cubed) = 16,777,216.

## RGB to HEX

Converting from RGB to HEX is just as simple. RGB values should be in the range of 0 through 255. Therefore, all that we need to do is convert R, G, B to Hex strings, and then concatenate the three hex strings together.