Chrome渲染颜色不正确,但Safari或Firefox无法渲染

时间:2022-09-10 19:06:18

I'm coding a website as a little project and I ran across something a weird when testing in Chrome on Mac OS X. I have a div as a header where I set the background color to #FF9540. Most times it renders as RGB (255, 149, 64) which is right. On some pages though, it renders as RGB (245, 152, 33). I noticed when it does render correctly, it first renders RGB (245, 152, 33) then switches to RGB (255, 149, 64) when it loads. This problem does not exist in Safari or Firefox. I've included two pictures showing the div is styled the same hex color, but it is rendered as two different colors.

我正在将一个网站编写为一个小项目,我在Mac OS X上的Chrome测试中遇到了一些奇怪的事情。我有一个div作为标题,我将背景颜色设置为#FF9540。大多数时候它呈现为RGB(255,149,64),这是正确的。但在某些页面上,它呈现为RGB(245,152,33)。我注意到它正确渲染时,它首先渲染RGB(245,152,33)然后在加载时切换到RGB(255,149,64)。 Safari或Firefox中不存在此问题。我已经包含了两张图片,显示div的样式是相同的十六进制颜色,但它呈现为两种不同的颜色。

Also, uploading the images here gives different RGB values than I see when I load the images on my computer.

此外,在此处上传图像会产生不同于我在计算机上加载图像时看到的RGB值。

Chrome渲染颜色不正确,但Safari或Firefox无法渲染Chrome渲染颜色不正确,但Safari或Firefox无法渲染

1 个解决方案

#1


-1  

Just fixed this thanks to this guide(DEAD LINK).

刚刚解决了这个指南(DEAD LINK)。

Simply go into Disk Utility, select your disk and repair permissions. When it's done restart Chrome and you should see the difference.

只需进入“磁盘工具”,选择您的磁盘并修复权限。完成后重启Chrome,您应该看到差异。

This worked for me using Chrome 27.0.1453.116 on OSX 10.8.4

这对我来说在OSX 10.8.4上使用Chrome 27.0.1453.116

#1


-1  

Just fixed this thanks to this guide(DEAD LINK).

刚刚解决了这个指南(DEAD LINK)。

Simply go into Disk Utility, select your disk and repair permissions. When it's done restart Chrome and you should see the difference.

只需进入“磁盘工具”,选择您的磁盘并修复权限。完成后重启Chrome,您应该看到差异。

This worked for me using Chrome 27.0.1453.116 on OSX 10.8.4

这对我来说在OSX 10.8.4上使用Chrome 27.0.1453.116