Background colour of a PNG in IE8

后端 未结 7 772
孤独总比滥情好
孤独总比滥情好 2020-12-05 08:12

I have the following logo, which displays as the same background colour as the HTML body in FF3, Chrome (#363636).

But in IE8 it displays a different, darker colour.

7条回答
  •  自闭症患者
    2020-12-05 08:25

    The top-rated answer here suggests a bizarre reset to the gamma value of 0.5181347 using pngcrush. This may work in some universes, but in ours your best path is to strip all color-space information from the PNG so that it is rendered purely in the same neutral RGB-triplet space that the browsers are using for colors in CSS:

    pngcrush -rem cHRM -rem gAMA -rem iCCP -rem sRGB infile.png outfile.png
    

    What this means for real color-heads is that the original color you designed may not appear the same on another monitor or operating system, but all your colors with the same RGB values will be rendered the same way for each user according to the browser+os they are on. Specifically, background or adjacent colors abutting a PNG will match, so you can design your site with interlocking images and colors.

提交回复
热议问题