Phaser slightly changes the color of sprites

image

the background in this image is set to #9bbc0f in the game config. the grass sprites also have a background of #9bbc0f, and i’ve confirmed that by opening them in glimpse in checking. however, in this screenshot, it’s clearly a different color from the background. checking the screenshot in glimpse says the color is #91b726. the change is tiny, but clearly noticeable

the issue happens with no postprocessing, and happens regardless of config.pixelArt. any ideas what might cause it?

a user in the discord server helped out a bit and realized that the issue doesn’t exist on chrome. so is this a firefox issue, or a phaser issue?

The png may have a value for gamma correction. Delete it to see if it fixes. Look at here: How can I make firefox render PNG with correct colors? - Stack Overflow

3 Likes

aha! that was indeed the issue. running convert grass.png.bak -define png:include-chunk=none -average grass.png fixed it. thank you!

2 Likes