12

Our designer gave me a color value:

RGB 217,114,62

In mac image preview I open the color selector, switch to rgb and put in the rgb values. But the color preview seems to be too dark. So I take the color picker and select the color in the preview window. And instead of the same values, it shows RGB 206,93,48. First I thought some sort of color profile would change the colors. But reapeating the procedure with this darker color does not result in a third value. It stays 206,93,48. Then I guessed it might be the nearest web safe color that it switches to. But it's not in the list. What is going on here? Is 217,114,62 a magic value?

I decided to make a html page with a div and styled it to rgb 217,114,62. All fine:

<body>
    <div style="background: rgb(217,114,62);width:300px;height:300px;">RGB 217,114,62</div>    
</body>

Now I made a screen shot and opened it in preview. Fine. I added a rectangle, selected it's color with the color picker. The correct color as you can see.

enter image description here

Then I just click the pointer into the HEX field. Automatically the rectangle darkens but the colour values stay the same. See:

enter image description here

When I now pick the darker color from the rectangle it is... You already guessed it... 206,93,48. WTF!?

I have the same problem in all my mac programs that use the color picker. I have no clue what it can be. I tried changing the display color settings to whatever. Same result. OS-X 10.10.1.

1 Answer 1

15

You (and possibly your designer) need to familiarize yourself with color profiles. "RGB 217,114,62" does not adequately specify a color. You would need to know in which color profile that was expressed. For example, sRGB vs. Generic RGB.

When you use the eyedropper in the color picker to sample a color from the screen, you get the values in the device color profile. This will be different from a calibrated color profile like sRGB or generic.

The gear icon next to the pop-up menu showing "RGB" in your screenshots both shows you the color profile for the values shown by the sliders and text fields and lets you change the profile (thus converting the values).

I suspect that clicking in the hex field switches the color profile to sRGB because that's the color profile of web colors but, on the theory that you want to use the sliders and text fields to specify a color in that profile, it doesn't convert the current values. Instead, it reinterprets them in the new profile. For what it's worth, your last screenshot as shown on my screen and sampled with the eyedropper shows that the outer color is nearly 217,114,62 in the Generic RGB color profile while the inner color is nearly 217,114,62 in the sRGB color profile.

You need to check with your designer to find out what color profile they are expressing the colors in. If they aren't color-profile-savvy, they may have expressed them in their personal screen's device profile, which is basically useless. Also, if they are giving you image files to work from, those need to have an embedded color profile so that you can be sure they display (nearly) the same on your screen as they do on theirs. (You both should also calibrate your display's color profile using Display Calibrator or dedicated hardware. You can open Display Calibrator from System Preferences > Displays > Color > Calibrate.)

Once you've confirmed that, you need to switch the color picker to the desired color profile before entering values. Or sample from an image file with an embedded color profile as displayed by an app which properly handles that (Preview will do), and then convert to a specific color profile. If you were to create the color in code, you would use +[NSColor colorWithCalibratedRed:green:blue:alpha:] for values in the Generic RGB color space or +[NSColor colorWithSRGBRed:green:blue:alpha:] for values in the sRGB color space.

1
  • THANKS, Ken youre right. I switched my display settings to generic rgb, took a screenshot. File info said generic rgb. Opened color picker, cklicked the gear icon, set it to generic rgb. Put in the 217,114,62. Used the color selector to grab the color from preview. The values were transformed. Checked settings: Selection had switched to srgb. Ookay. Switched machine settings to srgb. Created an srgb screenshot. Set the color picker to srgb. Put in the value, selected the color from the preview -> it switched to generic rgb. Thanks to you I know what happened. But why it switches... No idea. May 5, 2015 at 16:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.