Safari Color Weirdness

Well, I've recently had a weird experience with the color rendering of Safari, and I wasn't sure whether to ask this question here or in the display forums, but I guess I'll start here. This will no doubt be a long message, and for that I apologize in advance.

I have a Web page at http://www.voodooimages.com for which we use an RGB 90/90/90 background for color neutrality (a bit darker than 128/128/128, but still neutral) because it is a photography site. There is a composite image on the main page and a logo at the top of the other pages of which the backgrounds are also 90/90/90, so that they will blend in with the background of the page as a whole. These images are JPEGs with an sRGB color space embedded. I could have used GIFs with transparent backgrounds, I suppose, but the JPEGs are much better quality images. At home, I have an older Mac (733mHz G4) that I use with two CRT displays, the primary one of which is calibrated and profiled for correct color presentation, and the Safari Web browser. At work, I am forced to use PCs and Internet Explorer.

I am about to "pull the trigger" on a 2.66 gHz Intel MacPro and a 30" Cinema Display, and since a friend of mine recently bought this identical setup, I went to his house last weekend to see his new stuff before I placed the order for mine. Since he had not yet taken the trouble to calibrate and profile his display, I was especially interested in how it rendered color "right out of the box," since the Cinema Displays are supposedly set up from Apple to a 6500 degree white point and a 2.2 gamma, which is what I calibrate my displays to. One of the places we went to look at was my Web site. Imagine my surprise when we saw that the embedded backgrounds of the composite and logo images were being displayed significantly darker than the general page backgrounds on his new display! How can that be, we thought, when Safari is a "color aware" browser and both of those things are set to 90/90/90? They show identically and merge together perfectly at home on my profiled display, at my other friend's profiled 23" Cinema Display, and on every PC I've ever seen (although often way too bright and washed out on uncalibrated Dell and HP displays). Totally baffled, we decided to get out his profiling puck and profile the new display. After profiling, the colors of the page background and the images blended perfectly, as they should. "Well, that is STRANGE," we thought. We called my other friend at that point and confirmed that the colors showed correctly on his profiled 23" Cinema Display, but that they were different on his new, uncalibrated, 15" MacBook Pro display. This was getting curiouser and curiouser.

We were all three headed for an Apple Pro Applications Aperture seminar that afternoon, and we planned to stop by the local Apple store on the way, so when we arrived there we started checking out my Web site on all of the Macs and their displays in the store, all of which are, of course, running "out of the box" color profiles (Cinema HD, I suppose). Sure enough, they all displayed the colors incorrectly, with the page background lighter than the 90/90/90 embedded in the images. Stumped and dismayed, we started asking the store geniuses what was going on - nobody knew. One of them downloaded Firefox to one of the machines and tried my page in that browswer - perfect color match! What the heck? We checked the source code of the page...sure enough, the background color was set to 5A/5A/5A (RGB 90/90/90 in hexadecimal). We left, having accomplished nothing but confusing three more people.

So we went to the seminar (which was VERY good, by the way). Later that evening, my friend with the uncalibrated MacBook Pro went back and checked my Web page using other profiles, but still not having calibrated his display. He found that the color mismatch only revealed itself when Safari is used with two profiles - Cinema HD (the default as-shipped) and Apple RGB. So, it appears that Safari, the only "color aware" browser other than IE for the Mac (when you turn color awareness on, which nobody does because it no longer works with new Macs), has a color rendering problem (at least for RGB 90/90/90) when used with Apple-developed profiles. How weird is that? First of all, it's exactly the opposite from what I would have expected, and second, it means that the 90% or so of Mac users who never bother to profile their displays (and why should they? They're very good out of the box and unless you're a photographer making prints, why buy profiling hardware and software?) think my Webmaster and I are idiots who can't design a Web page properly. I'd just as soon not leave that impression with people who use my preferred platform.

Interestingly, my friend with the MacBook Pro also has an iPhone, and it does NOT display this color mismatch, even though it uses Safari as its browser. I'm guessing that this may be because the Safari it uses may be different from the full-blown program as regards color awareness or that the profile of its display is unlike the Cinema Displays to save memory space on the phone.

I've checked to verify that the composite and logo images at the site do indeed have sRGB embedded - they do. The background color source code (body bgcolor="5A5A5A") is correct. I asked the Webmaster to add a pound sign to that code to see if it made a difference - it didn't. We're all still baffled about what is causing this discrepancy. On the theory that every situation you experience has already been experienced by someone else out there, I'm coming here looking for help. Do any of you know what is causing this anomaly? I would like very much to fix it if that is indeed possible.

Thanks for any help you can offer.

Bob Krueger

733 mHz G4 tower, Mac OS X (10.4.10)

Posted on Aug 26, 2007 12:07 PM

Reply
17 replies

Sep 21, 2007 3:06 AM in response to David M Brewer

I can confirm that when using the Quicktime Player, simply opening imagefiles, not only are JPGs and PNG's are treated differenctly. They are both displayed wrong. I have not analyzed exactly what happens, but it is truly color confused. Similar to iWEB 2.0

I used an AdobeRGB original and saved with the AdobeRGB profile to emphasize the problem. You can compare by opening the same files with Preview which does things correctly.

Report problem to Apple - http://www.apple.com/quicktime/feedback/

Test image can be found on http://www.tomasjonsson.eu/picts/QTTEst.jpg and http://www.tomasjonsson.eu/picts/QTTEst.png

Tomas

Sep 8, 2007 1:41 AM in response to Voodoo Bob

Hi Bob

You have stumbeled on one more issue regarding the WEBs color confusion. Your problem is easily explained, and hopefully easy to fix.

IN SAFARI
Images (.jpg) with a color profile are displayed correctly, regardless of image colorspace and monitor profile. This means that an RGB value of the image will be translated into another (correct) RGB value, for the monitor.

However, a hardcoded background color is just an RGB value with no reference to colorspace. Thus it will not be translated, but rather sent directly to the monitor as is.

Your images are in sRGB color space. If the monitor happens to be a perfect sRGB monitor, RGB values will not be changed between the image on the WEB and the monitor. Thus, your image background and page background will be in synch.

IN NON COLOR MANAGED BROWSERS
Image RGB values and background RGB values are always sent directly to the monitor. Thus, your image background and page background will be in synch.

CINEMA DISPLAY
It appear that default calibration of Cinema Display (and any other Mac display) is not sRGB or g2.2 - which by the way should be no surprise, it never was that way.

WORKAROUND
If you can use a small .jpg or .png (sRGB color space with a profile) image as the background, the problem will go away. Try something like -

style="background: #ffffff url(background.jpg) repeat scroll top left; margin: 0pt; "

I got this from iWEB which does a good job with backgrounds.

See also http://www.tomasjonsson.eu - about iWEB and iPhoto and the WEB

Tomas Jonsson

Sep 15, 2007 6:11 PM in response to Tomas Jonsson

"WORKAROUND
_If you can use a small .jpg or .png (sRGB color space with a profile) image as the background, the problem will go away. Try something like -_

_style="background: #ffffff url(background.jpg) repeat scroll top left; margin: 0pt; "_

Tomas,

Thank you very much for your response. We constructed a small (100 X 100 pixels) JPEG file with a 90/90/90 background and an embedded sRGB profile and used it in the HTML statement you supplied. It WORKED! Again, thank you.

Although I understand basically what makes the new way of defining the background work, I still think it's a "bug," and not a feature of Safari being color-aware. Geesh, what a kludgy way of having to define a background. It also leaves me with other unansered questions like...

1. Would the reverse concept work as well? In other words, if we defined the background conventionally and used composite and logo image files with no profile embedded, would the colors match in Safari and Apple's default profiles?

2. Why doesn't this anomaly appear in the Safari that's on an iPhone? My guess is that the version of Safari that an iPhone uses is not color-aware.

3. Why does this anomaly present itself on an uncalibrated display only when using Apple's Cinema HD and Apple RGB profiles?

Anyway, I'm glad to have it resolved, and I thank you for the resolution.

Bob Krueger
www.voodooimages.com

Sep 16, 2007 3:48 AM in response to Voodoo Bob

Hi Bob

Bob - " I still think it's a "bug," and not a feature of Safari being color-aware."

Well, I think the idea of being color aware is correct. The problem (or bug) is that it is only half way implemented in Safari.

Your problem could theoretically also have been solved by tagging the entire page with an sRGB profile, telling the browser to interpret all colors as sRGB, background and images alike.
<body bgcolor="5A5A5A" iccprofile="sRGB%20Color%20Space%20Profile.icm"> for instance.

However, it appears that no browser support this, yet.

Bob - "1. Would the reverse concept work as well? In other words, if we defined the background conventionally and used composite and logo image files with no profile embedded, would the colors match in Safari and Apple's default profiles?"

Yes, they would match, but images would not have the right colors.

Bob - "2. Why doesn't this anomaly appear in the Safari that's on an iPhone? My guess is that the version of Safari that an iPhone uses is not color-aware."

Probably you are right, no support for color profiles on iPhone, but it could support for instance sRGB on the internet. If you have an iPhone, could you surf to http://www.gballard.net/psd/golive_pageprofile/embeddedJPEGprofiles.html and report back the result? I am very curious.

Bob - "3. Why does this anomaly present itself on an uncalibrated display only when using Apple's Cinema HD and Apple RGB profiles?"

I am not sure I understand the question, exactly.
In your case, when we are limiting ourselves to only comparing shades of grey, the key would be the mysterious monitor gamma tuning. If gamma is tuned to 2.2, monitor grey shade calibration will be similar to what is assumed in the sRGB profile. Thus, hardcoded greys and color managed greys will appear the same.

On the other hand, if you would choose for instance a bright green color, there would still be a difference between the hardcoded and color managed green.

---
BTW, You are using white font color. Smart. This is why you are not having a problem with font colors 😉

Looking forward to view your WEB site when updated.

Tomas

Sep 17, 2007 10:57 PM in response to Tomas Jonsson

Thomas,

The site you linked uses either Flash or Java to display the overlapping images when you roll and/or click your mouse over them. FYI... The iPhone does not support Flash or Java (but it is expected to in a Firmware update at some point). So, all the iPhone will display is the top, default image. When you touch the image (either image), the whole image dims a bit but that is normal behavior for ANY image when you touch it on the iPhone. The test images never show the other image names when you touch them. Plus, with the iPhone, there is no way to simulate rolling over AND holding the mouse button down at the same time (as required with the second image on the test page).

Mark

Message was edited by: Mark Booth2

Sep 19, 2007 6:36 PM in response to Tomas Jonsson

Tomas,

Thanks again for your suggested fix. We now have all of the pages changed. If you're interested in looking at them, the site is at http://www.voodooimages.com.

_If you have an iPhone, could you surf to http://www.gballard.net/psd/golive_pageprofile/embeddedJPEGprofiles.html and report back the result? I am very curious._

It's my friend Mark who has the iPhone. He went to your site and has already replied to you in this thread.

_Bob - "3. Why does this anomaly present itself on an uncalibrated display only when using Apple's Cinema HD and Apple RGB profiles?"_

_I am not sure I understand the question, exactly._

What I meant is that the color anomaly appears only in Safari, but not with all monitor profiles. As I reported before, you can make the anomaly disappear, even in Safari, by using a colorimeter and software to make a custom profile for your monitor. Once you load that profile, the problem disappears. Perhaps more weird, though, is that you can also make it disappear by loading canned profiles included with the system other than the two that Apple has defined - Cinema HD, which is the out-of-the-box default profile for new Macs with Apple Cinema Displays, and Apple RGB. If you take a Mac with a brand-new Cinema Display and simply change the monitor profile to, for example, Adobe RGB - with no custom profiling - the problem again goes away. So the problem appears to be not with Safari's color interpretation alone, but is also a function of Safari in combination with canned monitor profiles from Apple. I thought that was the strangest part of the whole thing.

Just about everything I've read says that Apple Cinema Displays are about as color-accurate out of the box to a monitor calibrated to a white point of 6500 degrees and a gamma of 2.2 as you can get. That's fine with me, because that's exactly the parameters to which I calibrate my monitors. That's why I was so surprised when we first ran into this mismatch issue.

Voodoo Bob

Sep 20, 2007 6:16 AM in response to Voodoo Bob

Bob

I looked at your web site. Many interesting car pictures.
Things look better now, for image backgrounds and page backround.

But, if you are looking for perfection:

Menu and BACK buttons, has a different shade of grey than the page background in Safari - when monitor is not calibrated to gamma 2.2

In Windows Firefox, Windows IE and MacOS Netscape, your menu items has a white outline, but not in Safari (Windows and Mac)


-----
Why colors are different in Safari

Only Safari (Mac, Windows), Omniweb and the old IE-Mac cares about colorprofiles on the WEB. However, they only care about color profiles for images. Other colors are still not color managed.

On SHADES of GREY, there will be a visual difference between browsers (with/without color management), only if monitor profile is calibrated to a gamma different than 2.2. Because, on the WEB, colors are specified assuming gamma 2.2.

AppleRGB and Apple's standard monitor calibration is based on an assumed 1.8 gamma value
sRGB, AdobeRGB are based on an assumed gamma 2.2 value
If you calibrate your cinema display with gamma 2.2 target value, it will be similar to sRGB

Note, The gamma setting (1.8 or 2.2) is actually not a setting of the monitor itself, it is a setting of the grayscale curve of the graphics card. If there is NO COLOR MANAGEMENT - this setting will make a difference. IF THERE IS COLOR MANAGEMENT, this setting is basically irrelevant, because color management will accomplish the correct colors regardless of graphic card settings. (Assuming correct color profiles have been set).

The external monitors, however, do normally have a gamma response curve of about 2.2. So the OUTPUT of the graphics cards are always at gamma 2.2, but the INPUT to the graphics card can be 1.8, 2.2 or something else. And logically follows, Cinema Display has a gamma of 2.2 always - out of the box. The setting of your computer however, is a different story.

On COLORS other then GREY, there will be more or less a difference between browsers (with/without color management) depeding on the difference between source image color space and the uncalibrated monitors color space. There will be a difference regardless of monitor gamma calibration, but sometimes small enough to be ignored.

----
Solution - if you care about colors when making WEB sites.

Use sRGB images with color profile, for images, surfaces and any colored item. Black or white can reasonably safe be specified as hardcoded colors.

Tomas

Message was edited by: Tomas Jonsson

Sep 20, 2007 11:38 PM in response to Tomas Jonsson

Thomas, I tried your suggestion using RGBs and a screen gamma of 2.2. I placed a gray image 50x50 pixels across the top (horizontally) portion of an html with the same color bg. It matched perfectly.

So, if you use this setting for your images. Your image in Photoshop and what is displayed in web page will match too. Is that correct?

To bad this doesn't work with Quicktime using a PNG. A PNG image in Quicktime won't match the background of an html...using a tiff (jpg) it will match.

Sep 21, 2007 12:20 AM in response to Voodoo Bob

_Are you SURE about that? 1.8 is an obsolete gamma setting that was meaningful only back in the one-piece Macintosh days. as far as I know, the whole world (except Dan Margulis), Mac or PC, is based on gamma 2.2 these days._

Yes I am sure. The historical reason for 1.8 gamma is that this is a good approximation of printer gamma (Dot magnification in printing lingo). Think desktop publishing in the B&W days.

Anyway, gamma alone does not give the right color, and it does not matter what gamma there is, IF you use a color managed environment.

Tomas

Sep 21, 2007 12:29 AM in response to David M Brewer

_So, if you use this setting for your images. Your image in Photoshop and what is displayed in web page will match too. Is that correct?_

You must distinguish publishing from browsing. When publishing, using sRGB with color profile is the correct way. The monior gamma is irrelevant then, as long as you use color managed software such as Photoshop.

When browsing, because browsers are only partially or not at all, color managed, a monitor gamma of 2.2 will improve things for WEB sites which did not follow all the color management rules.

Tomas

Sep 21, 2007 1:12 AM in response to David M Brewer

_To bad this doesn't work with Quicktime using a PNG. A PNG image in Quicktime won't match the background of an html...using a tiff (jpg) it will match._

This sounded mysterious, so I had to look into it. Basically, PNG files should contain a color profile and behave the same way as JPEGs with a color profile.

Where you using Photoshop to create the PNG files?
What profile is included in the PNG files? (Use Preview, Get Info to check)

I found a very strange behaviour (Error) in the Photoshop CS1, save for WEB feature. When choosing PNG format, Photoshop will replace the color profile of the original with the mysterious, "Calibrated Color Profile". Not only is it wrong to replace the color profile without converting the image first, but it looks like the so called "Calibrated Color Profile" is actually AppleRGB (with gamma 1.8)

Also for JPEG's behaviour is not ideal, as output color space will be the same as working space.

I have said it before, and will say it again - don't use the Save for WEB feature in Photoshop, use the regular save instead, so you will know what is going on.

Tomas

Sep 22, 2007 9:23 AM in response to Tomas Jonsson

_The historical reason for 1.8 gamma is that this is a good approximation of printer gamma_

Yes, for the original LaserWriter. Most of the topics you read on the 1.8 subject, including Photoshop books, bring up this historical point in their color management sections and then tell you that the 1.8 gamma thing is from the past and no longer relevant for monitor calibration...to use 2.2 on both sides of the Windows/Mac aisle. I assumed it was no longer relevant for anything - apparently a bad assumption. LUTs and such are not exactly what I would call strong areas in my knowledge base.

_Menu and BACK buttons, has a different shade of grey than the page background in Safari - when monitor is not calibrated to gamma 2.2_

OK, everyone out there who is listening, please calibrate your monitors to gamma 2.2 🙂 Interestingly, I and others at my day job, who are forced into working with computers from the "dark side," do not see this on either CRT or LCD monitors. Believe me, none of these things are calibrated to anything. It must be very subtle. Why are we looking at the Voodoo Images site at work? Well, please don't tell the boss.

_In Windows Firefox, Windows IE and MacOS Netscape, your menu items has a white outline, but not in Safari (Windows and Mac_

Of this I am aware. There are two reasons I'm just going to leave this as it is. The first is that my Webmaster placed those buttons and he picked ones that have frames around them. That's OK, because the Windows guys need more help in locating things anyway and are more inclined to want to know they are functioning inside the box. He is himself a "dark side" programmer and one of my best friends, so I have to indulge him on some of these little things. Believe me, it's worth it. He does what I think is a fine job, and quickly, for all of the little nit-picking things I ask him to do, sometimes on a daily basis. On the Mac side, which is where most of the Safari users are, the presentation is, I think, a bit more elegant without the borders, which seems appropriate to me. (Note to Windows users out there - don't get all offended. I'm typing with my tongue firmly in my fingers).

And one last thing...

_You must distinguish publishing from browsing. When publishing, using sRGB with color profile is the correct way._

Well, that depends on, of course, to what you're publishing. If you're publishing to the Web, yes. But if you're publishing to a magazine, probably not. In that case you publish to whatever the art director there wants (or that you can talk him into). The big issue there is that whatever color space you're using, both of you need to be in sync. In my case, that's Adobe RGB, basically because it's a larger color gamut than sRGB and will, therefore produce a more "color rich" CMYK conversion. Most of the motorsports photographers I know are also sending their images to their editors in Adobe RGB. Everything I send to my printer (the one here at home, not some company) is also Adobe RGB, again for the larger gamut.

I want to thank you again, Tomas, for all of your good input and help in getting this issue squared away for us. Without you, this topic would be well on it's way to page 13,789 and the 95% of the world's Mac users who use Safari and never profile their monitors, should they happen to drop by Voodoo Images, would be saying "Why can't these guys get their background colors right?"

"Voodoo Bob" Krueger
http://www.voodooimages.com

Sep 22, 2007 2:19 PM in response to Voodoo Bob

Voodoo Bob

_OK, everyone out there who is listening, please calibrate your monitors to gamma 2.2 :)_

Ahh, no, no. Report bug to Apple - In Safari, Safari Menu, Report bugs to Apple with the following content, or similar.

"Safari defaults to Monitor profile instead of sRGB when an image is without color profile
Safari ignores color profiles on WEB pages
Safari interprets html coded colors with monitor profile instead of sRGB"

Besides that, nothing to add 😉

Tomas

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Safari Color Weirdness

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.