Why do browsers render rgba differently on OSX?

扶醉桌前 提交于 2019-12-03 08:25:58

First off

Well, actually Safari and Firefox are both correct: 0xFF = 255, 255 / 2 = 127.5. So 128 may be correct (0x80), but also 127 (0x7F) - depending on the rounding convention of the browser.

Explantion of the issue

These are rounding issues. I don't quite get why there are rounding issues, since 0.5 is representable in binary numbers without precision loss, but there are, in fact rounding issues:

Opera:

Chrome:

When I checked in chrome & safari, But I got exact same rgba color #808080 in both. Let us know which browser version you are using.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!