1. Computing

Discuss in my forum

How To Convert From RGB to Hex on Macintosh OS X

By , About.com Guide

Most web pages use hexadecimal triplets to define colors (for example: #ffffff is white or 255,255,255 in RGB). And most graphics software tools use RGB for colors. But if you're using a Macintosh, it's easy to use the built-in calculator to convert RGB colors to hexadecimal codes.
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. This is typically in the “Applications” folder, but if you can’t find it there, then search in Spotlight for “Calculator.”
  3. Enter the first number in the RGB code into the calculator. In my example, that would be 177.
  4. Go to the “View” menu and choose “Programmer.” (the shortcut key is Cmd-3).
  5. The number in the input box will change to a number in the format 0x0. The characters after the first “0x” is what you want. In this case B1.
  6. Go back to the “Basic” calculator (the shortcut key is Cmd-1).
  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.
  2. With CSS you can define colors using the RGB codes. You write color: rgb(177,102,0) rather than the hexadecimal code.
  3. If you have a “Calculator II” you can use this to convert to Hex as well, just press the “HX” button to see the hexadecimal number.

What You Need

  • Macintosh OS X Calculator

©2013 About.com. All rights reserved.