Chrome 渲染颜色的方式与 Safari 和 Firefox 不同
由于某种原因,Chrome 将 #FF3A00 渲染为 #FF0000。我提供了 jsfiddle 的屏幕截图来说明这一点。色度计报告的颜色(以及我看到的颜色)与 CSS 所说的颜色不同。
其他颜色也会发生这种情况。例如,#FFAF00 根据色度计渲染为#FFA400。
但是,在 Safari 和 Firefox 上渲染颜色没有问题。我在 Mac 上使用 Chrome 11、Safari 5 和 Firefox 5。
我确信有一个合乎逻辑的解释。有什么想法吗?
更新:我在 Safari 旁边附上了 Chrome 的屏幕截图,显示了完全相同的页面。我在 Photoshop 中检查了此图像:Chrome 中的颜色为 #F00,Safari 中的颜色为 #FF3A00。
Chrome renders #FF3A00 as #FF0000 for some reason. I included a screenshot from jsfiddle to illustrate the point. The colour that the Color Meter reports (and what I see) differs from what CSS says.
This happens to other colours too. For example, #FFAF00 is rendered as #FFA400 according to the Color Meter.
However, the colours are rendered without problems on Safari and Firefox. I'm on a Mac using Chrome 11, Safari 5 and Firefox 5.
I'm sure there's a logical explanation. Any ideas?
Update: I'm attaching a screenshot of Chrome next to Safari showing the very same page. I checked this image in Photoshop: the colours are #F00 in Chrome and #FF3A00 in Safari.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
好吧,事实证明,我需要重新启动 Chrome。我经常将 MacBook Air 连接到 24 英寸显示器。当我更改为与 Chrome 启动时使用的显示器不同时,Chrome 似乎无法正确显示颜色。
我在 Google 帮助论坛上找到了答案:“我应该提到的是,在 OS X 中,每次更改显示器或显示器配置文件时(例如,如果从笔记本电脑显示器切换到外部显示器),您必须重新启动 Chrome,以便它从操作系统获取正确的显示器配置文件信息。
Ok, as it turned out, I needed to restart my Chrome. I often connect my macbook air to a 24 inch monitor. It looks like Chrome displays the colours incorrectly when I change to a monitor that's different from what was used when Chrome was started.
I found the answer on the Google Help forum : "I should mention that in OS X, every time you change your monitor or monitor profile (e.g. if you switch from your laptop display to your external display), you MUST restart Chrome for it to get the proper monitor profile information from the OS."
默认情况下,Firefox 和 Safari 都使用 sRGB 颜色配置文件。如果您的 Google Chrome 采用不同的颜色配置文件作为默认值,您也必须执行相同的操作。
By default both Firefox and Safari use the sRGB color profile. You must do the same, if your Google Chrome takes a different color profile as default.
我最近发布了一个类似的问题:https://stackoverflow.com /questions/6338077/google-chrome-for-mac-css-colors-and-display-profiles
正如 Andrew Marshall 在那里回答的那样,这是一个已知问题:http://code.google.com/p/chromium/issues/detail?id=44872
I recently posted a similar question: https://stackoverflow.com/questions/6338077/google-chrome-for-mac-css-colors-and-display-profiles
As Andrew Marshall answered there, this is a known issue: http://code.google.com/p/chromium/issues/detail?id=44872
Mac 已为您的显示器设置色彩校正。您的浏览器可能会也可能不会对网页内容/图像使用颜色校正,具体取决于其设置。您的颜色选择器报告您的操作系统认为它正在渲染的内容。您的浏览器可能会报告其他内容。
电脑上的颜色。我们许多人认为这是理所当然的,但从未费心去理解它是如何呈现的。
Mac has color correction set up for your monitor. Your browser may or may not use color correction for web content/images depending on its setup. Your color picker reports what your OS thinks it is rendering. Your browser may report something else.
Color on computers. Something many of us take for granted but never bothered to understand how it is rendered.
以防其他人因为 Firefox 图像看起来色彩太丰富(过度饱和)而来到这里。
有关如何修复此问题的完整指南https://cameratico.com/color-management/firefox/
很快:
about:config
gfx.color_management.mode
设置为1
gfx.color_management.enablev4
为true
现在 Firefox 将显示与 Safari、Chrome 和所有其他浏览器相同的颜色
In case someone else come here because firefox images looks too colorful (over saturated).
Full guide on how to fix it https://cameratico.com/color-management/firefox/
Shortly:
about:config
on your Firefox address bargfx.color_management.mode
to1
gfx.color_management.enablev4
totrue
Now Firefox will display colors same as Safari, Chrome and all other browsers
Chrome 颜色选择器的工作原理是从当前显示器颜色配置文件中获取颜色,更改颜色设置或有时更换显示器可能会出现此问题,请检查以下方法来解决。
转到 chrome://flags/#force-color-profile 并单击“全部重置为默认值”,
谢谢。
Chrome color picker works by taking color from current monitor color profile,and the problem may happens by changing color setting or sometime change monitor, please check the below method to solve.
Go to chrome://flags/#force-color-profile and click Reset all to default
Thanks.
我更改了 OS X 中的颜色配置文件,这对我进行了排序。
请参阅下面使用不同颜色配置文件的屏幕截图。请注意,在屏幕截图中,我尝试区分
#ff00ff
、#ff1aff
、#ff33ff
和#ff4dff
>。只有当我不选择默认的 OS X 颜色配置文件时,我才能正确区分颜色。默认颜色配置文件:
使用不同的颜色配置文件:
来自:OS X 上的 CSS 颜色在 Firefox 中正确显示,但在 Safari 和 Chrome 中显示不正确(可能“已解决”)
我发现 Safari 和 Chrome 无法区分
#ff00ff
、#ff1aff
、#ff33ff
和#ff4dff
。但火狐可以。此外,X11 应用程序 Inkscape 也可以。但 Gimp 和 Libreoffice Writer(非 X11 应用程序)却不能。 Firefox 和 X11 应用程序似乎以某种方式使用自己的颜色配置文件。我不知道为什么 Mac 默认使用彩色 LCD 配置文件,该配置文件在其他配置文件中不做这种区分。
I changed the Colour Profile in OS X and that sorted it for me.
See the screenshots below using different Color Profile. Note, in the screenshots I'm trying to differentiate between
#ff00ff
,#ff1aff
,#ff33ff
and#ff4dff
. It's only when I don't choose the default OS X colour profile that I can differentiate the colours correctly.Default colour profile:
With a different colour profile:
From: CSS colors on OS X displaying correctly in Firefox but incorrectly in Safari and Chrome (potentially 'solved')
I found Safari and Chrome could not differentiate between
#ff00ff
,#ff1aff
,#ff33ff
and#ff4dff
. But Firefox could. In addition Inkscape, an X11 app, could. But Gimp and Libreoffice Writer, non X11 apps, could not. Firefox and X11 apps seem to be using their own colour profile somehow.I have no idea why Mac defaults to
Color LCD
profile which does not do this differentiation amongst others.在 Photoshop 中导出 PNG 时,Chrome (Lubuntu) 遇到此问题。解决办法:文件->另存为->取消选中“ICC 配置文件:Adobe RGB (1998)”。
Had this problem with Chrome (Lubuntu) when exporting a PNG in Photoshop. Solution: File -> Save As -> Uncheck "ICC Profile: Adobe RGB (1998)".