You are here:About>Computing & Technology>Web Design / HTML> Web Design> Principles of Web Design> Color> Color Converters> Convert From RGB to Hex on a Windows Computer
About.comWeb Design / HTML
Newsletters & RSSEmail to a friendSubmit to Digg

How To Convert From RGB to Hex on a Windows Computer

From Jennifer Kyrnin,
Your Guide to Web Design / HTML.
FREE Newsletter. Sign Up Now!
When using color on Web pages, you have to use hex codes, but most graphics programs describe colors as RGB. But it's simple to convert an RGB code into a hexadecimal triplet for your Web page.
Difficulty: Easy
Time Required: 5 minutes

Here's How:

  1. Choose an RGB color you would like to convert. For example, a golden yellow in RGB is (177,102,0).
  2. Open the calculator, and in the view menu, change it to Scientific.
  3. Make sure that the "Dec" radio button is selected.
  4. Enter the first number in the RGB code into the calculator. In my example, that would be 177.
  5. Click on the "Hex" radio button.
  6. Record the code that appears as your first two digits of your hex-triplet. In my example, that would be B1.
  7. Repeat with the two remaining RGB codes. For my example, I get 66 and 00. My resulting hexadecimal code is #B16600.

Tips:

  1. I strongly recommend you only use browser-safe colors. These are colors that display accurately on more browsers and platforms.

What You Need:

  • Windows Calculator
 All Topics | Email Article | | |
Advertising Info | News & Events | Work at About | SiteMap | Reprints | HelpOur Story | Be a Guide
User Agreement | Ethics Policy | Patent Info. | Privacy Policy©2008 About, Inc., A part of The New York Times Company. All rights reserved.