For this test image, which has the follow colors in its four quadrants:

Below is how it composites on top of a black, white, and half gray (187 and 128) background.

The two squares on the left should approximately match, if you blur your eyes a bit. This won't be true if the image is not being rendered at one texel per pixel (because filtering software is usually implemented incorrectly), or because your monitor is not around a 2.2-2.4 gamma. Test your monitor with this page.

If PNG display is implemented properly (unlikely!), the lower-right square against the black background should be the same 187-gray as in the lower-left; against the white background the upper-right should be the same 187-gray as the lower-left (assuming a normal monitor). The problem on all browsers is that linearization is not performed.

See this article for more information.

Black background:

White background:

187-Gray background:

128-Gray background: