简体   繁体   English

Chrome 呈现的颜色与 Safari 和 Firefox 不同

[英]Chrome renders colours differently from Safari and Firefox

Chrome renders #FF3A00 as #FF0000 for some reason.由于某种原因,Chrome 将 #FF3A00 呈现为 #FF0000。 I included a screenshot from jsfiddle to illustrate the point.我包含了来自jsfiddle的屏幕截图来说明这一点。 The colour that the Color Meter reports (and what I see) differs from what CSS says.色度计报告的颜色(以及我看到的)与 CSS 所说的不同。

This happens to other colours too.这也发生在其他颜色上。 For example, #FFAF00 is rendered as #FFA400 according to the Color Meter.例如,根据色度计,#FFAF00 被渲染为#FFA400。

However, the colours are rendered without problems on Safari and Firefox.但是,在 Safari 和 Firefox 上呈现颜色没有问题。 I'm on a Mac using Chrome 11, Safari 5 and Firefox 5.我在使用 Chrome 11、Safari 5 和 Firefox 5 的 Mac 上。

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.更新:我在 Safari 旁边附上了 Chrome 的屏幕截图,显示了相同的页面。 I checked this image in Photoshop: the colours are #F00 in Chrome and #FF3A00 in Safari.我在 Photoshop 中检查了这张图片:颜色是 Chrome 中的 #F00 和 Safari 中的 #FF3A00。 Chrome 与 Safari

Chrome 将 #FF3A00 呈现为 #F00

Ok, as it turned out, I needed to restart my Chrome.好的,事实证明,我需要重新启动我的 Chrome。 I often connect my macbook air to a 24 inch monitor.我经常将我的 macbook air 连接到 24 英寸显示器。 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.当我更改为与启动 Chrome 时使用的显示器不同的显示器时,Chrome 似乎无法正确显示颜色。

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 (eg 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."我在Google 帮助论坛上找到了答案:“我应该提到,在 OS X 中,每次您更改显示器或显示器配置文件(例如,如果您从笔记本电脑显示器切换到外部显示器),您必须重新启动 Chrome 以使其从操作系统获取正确的监视器配置文件信息。”

By default both Firefox and Safari use the sRGB color profile.默认情况下,Firefox 和 Safari 都使用 sRGB 颜色配置文件。 You must do the same, if your Google Chrome takes a different color profile as default.如果您的谷歌浏览器默认使用不同的颜色配置文件,您也必须这样做。

  1. Access at Chrome: chrome://flags/#force-color-profile在 Chrome 中访问: chrome://flags/#force-color-profile
  2. Change Force color profile to " sRGB ".强制颜色配置文件更改为“ sRGB ”。
  3. Relaunch your browser and testify the rendered colors now.现在重新启动您的浏览器并验证呈现的 colors。

I recently posted a similar question: https://stackoverflow.com/questions/6338077/google-chrome-for-mac-css-colors-and-display-profiles我最近发布了一个类似的问题: 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正如 Andrew Marshall 在那里回答的那样,这是一个已知问题: http://code.google.com/p/chromium/issues/detail?id=44872

Mac has color correction set up for your monitor. Mac 为您的显示器设置了色彩校正。 Your browser may or may not use color correction for web content/images depending on its setup.您的浏览器可能会或可能不会对 web 内容/图像使用颜色校正,具体取决于其设置。 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.我们中的许多人认为理所当然,但从不费心去理解它是如何呈现的。

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. Chrome 颜色选择器通过从当前显示器颜色配置文件中获取颜色来工作,更改颜色设置或有时更换显示器可能会出现问题,请检查以下方法解决。

Go to chrome://flags/#force-color-profile and click Reset all to default Go 到 chrome://flags/#force-color-profile 并单击全部重置为默认值

Thanks.谢谢。

I changed the Colour Profile in OS X and that sorted it for me.我更改了 OS X 中的颜色配置文件并为我排序。

See the screenshots below using different Color Profile.请参阅下面使用不同颜色配置文件的屏幕截图。 Note, in the screenshots I'm trying to differentiate between #ff00ff , #ff1aff , #ff33ff and #ff4dff .请注意,在屏幕截图中,我试图区分#ff00ff#ff1aff#ff33ff#ff4dff It's only when I don't choose the default OS X colour profile that I can differentiate the colours correctly.只有当我不选择默认的 OS X 颜色配置文件时,我才能正确区分颜色。

Default colour profile:默认颜色配置文件:

使用默认配置文件

With a different colour profile:使用不同的颜色配置文件:

带有 sRGB ICE61966-2.1 配置文件

From: CSS colors on OS X displaying correctly in Firefox but incorrectly in Safari and Chrome (potentially 'solved') 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 .我发现 Safari 和 Chrome 无法区分#ff00ff#ff1aff#ff33ff#ff4dff But Firefox could.但是 Firefox 可以。 In addition Inkscape, an X11 app, could.此外,X11 应用程序 Inkscape 也可以。 But Gimp and Libreoffice Writer, non X11 apps, could not.但是 Gimp 和 Libreoffice Writer,非 X11 应用程序,不能。 Firefox and X11 apps seem to be using their own colour profile somehow. Firefox 和 X11 应用程序似乎以某种方式使用自己的颜色配置文件。

I have no idea why Mac defaults to Color LCD profile which does not do this differentiation amongst others.我不知道为什么 Mac 默认使用Color LCD配置文件,它不会在其他配置文件中进行这种区分。

In case someone else come here because firefox images looks too colorful (over saturated).以防其他人因为 firefox 图像看起来色彩太鲜艳(过度饱和)而来到这里。 Full guide on how to fix it https://cameratico.com/color-management/firefox/有关如何修复它的完整指南https://cameratico.com/color-management/firefox/

Shortly:不久:

  1. Type in about:config on your Firefox address bar在 Firefox 地址栏上输入about:config
  2. Set gfx.color_management.mode to 1gfx.color_management.mode设置为1
  3. Set gfx.color_management.enablev4 to truegfx.color_management.enablev4设置为true
  4. Restart firefox重启firefox

Now Firefox will display colors same as Safari, Chrome and all other browsers现在 Firefox 将显示 colors 与 Safari、Chrome 和所有其他浏览器相同

Had this problem with Chrome (Lubuntu) when exporting a PNG in Photoshop.在 Photoshop 中导出 PNG 时,Chrome (Lubuntu) 出现此问题。 Solution: File -> Save As -> Uncheck " ICC Profile: Adobe RGB (1998) ".解决方法:文件 -> 另存为 -> 取消勾选“ ICC Profile: Adobe RGB (1998) ”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Firefox中的表格呈现方式与Chrome或Opera不同 - Table Renders differently in Firefox than Chrome or Opera 为什么Firefox在处理CSS填充方面与Safari或Chrome不同? - Why would Firefox be handling CSS padding differently from Safari or Chrome? 可以在Chrome和Firefox中正确渲染,但不能在Safari或IE中渲染 - Renders properly in Chrome and Firefox, but not in Safari or IE Chrome 在另一台机器上的呈现方式与 Chrome 不同 - Chrome renders differently from Chrome on another machine Firefox的呈现方式与Safari / Chrome不同 - Firefox rendering differently than Safari/Chrome 0.1 rem边框宽度在chrome和safari上呈现不同 - 0.1 rem border-width renders differently on chrome and safari 在Flexbox下缩放比例转换在Chrome和Firefox中呈现的方式有所不同 - Scale transformation under flexbox renders differently in Chrome vs Firefox 导航栏中的Twitter Bootstrap搜索框在chrome和firefox中的呈现方式不同 - Twitter Bootstrap search box in navbar renders differently in chrome and firefox 如何解决Firefox渲染Bootstrap缩略图不同于Google Chrome的问题? - How to fix that Firefox renders Bootstrap Thumbnail differently than Google Chrome? border-image在Chrome和FireFox之间呈现不同的效果 - border-image renders differently between Chrome and FireFox
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM