[BUG] Different color shades of screenshots taken from different displays
See original GitHub issueI’m trying to use puppeteer
for visual regression testing.
When I do page.screenshot
output images differ (in shades of colors) on different displays (MBP built-in display vs Dell monitor display).
Am I missing some option?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
[BUG] Different color shades of screenshots taken ... - GitHub
I'm trying to use puppeteer for visual regression testing. When I do page.screenshot output images differ (in shades of colors) on different ......
Read more >Screenshot colors are wrong with color profiles (#3033) · Issues
Well the bug exists you thinking the colours are similar or not, right? The screenshot is supposed to be accurate to what is...
Read more >The screenshot's color from "Make Screenshot" is different ...
I use 3 methods to take screenshots: 1) Menu -> Make Screenshot 2) Send ... the same colors, while 1) produces slightly different...
Read more >Print screen does not save the right colors. How can I fix it?
I have two monitors, and I pulled the aseprite window to the another one, and on that screen the colors are wrong and...
Read more >BUG (or feature?) — Figma imports screenshots with the ...
Figma imports screenshots with the "wrong" colors in sRGB colorspace ... import them both back into Figma, they will be different colors.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Have you tried the Chromium flag
--force-color-profile=srgb|generic-rgb|color-spin-gamma24
?I’m having the same issue. It looks like Chrome has changed the way they render colors.
Chrome is now following the “color rendering profile” of the device. This makes Puppeteer much less useful for visual regression testing if you are running the tests on two different machines (which I believe most people are). For instance, generating the initial screenshots on my local machine and then having my CI server (Heroku or TravisCI) run my tests on every PR is much less effective because the CI server has either no display, or a much poorer quality display than my Retina Macbook display, so I get a lot of false positives and my tests fail.
The way I’ve addressed this is by having different thresholds for my CI server than I have for local development, eg:
This is sub-optimal to say the least. It would be great if there was a way to tell Puppeteer to pass a flag or something when it opens Chrome to force a color profile (either a default that lives in Puppeteer, or one that you provide).