March 10, 2006, Newsletter Issue #59: Convert Hex to RGB

Tip of the Week

This is a problem that plagued me for months. My graphic program accepts colors as RGB (red, green, blue) values, however, the color that I wanted as a background, I only knew as a hexidecimal value. After months of guessing at RGB values and searching the web for a utility that converts it for you, I found the solution.

For RGB and Hex values, all colors are made from combinations of the standard colors red, green, and blue, with each colorīs value between 0 and 255.

Hex values are (simple version to follow) codes used to represent the same values as RGB, and look like this FFCC00. First, break it into 3 equal parts, which are the values of red, green, and blue, respectively. Our sample now looks like this:
red=FF, green=CC, blue=00.

Now the conversion:
1) Open Windows calculator. Click on the "view" menu and select "scientific"
2) Ensure that the box beside "Hex" is checked
3) Enter the first value, FF. Then check the box that says "Dec", and record the value, 255
4) Repeat the same procedure for the second value, resulting in 204
5) The last value is easy and needs no converting because zero is zero. This is also true if you come across a value such as "0A", where you just need to enter "A". However, if it were "A0", you would need to enter the "0" as well.

So, our end result, FFCC00, is equal to 255, 204, and 0 in decimals (and RGB values). This also works for converting from RGB to Hex!

About LifeTips

Now one of the top on-line publishers in the world, LifeTips offers tips to millions of monthly visitors. Our mission mission is to make your life smarter, better, faster and wiser. Expert writers earn dough for what they know. And exclusive sponsors in each niche topic help us make-it-all happen.

Not finding the advice and tips you need on this Html Tip Site? Request a Tip Now!


Guru Spotlight
Sherril Steele-Carlin