-
-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use sRGB color profile #325
Comments
Hi @kasperkamperman, thanks for your feedback! pwa-asset-generator doesn't do anything special for the rendering of the colors and the color codes in image output. It's all set by Puppeteer and Chromium based browser itself. Before digging in, may I ask you to try RGB color value instead, such as |
I'm going to close this issue as by default a compression applies to the both image formats and color can change slightly. |
I think I know where this issue could emerge from. Today I noticed that one of my splash screen renders in a slightly different color. After investigation it appears that one of the images (apple-splash-1125-2436) is being rendered with RGB as opposed to sRGB color profile. |
Hey @wojtekmaj, thanks so much for shedding a light on this issue! There's a chrome flag forcing Chromium to run with sRGB color profile. I'm going to ship a new version with this fix. |
There's occasionally a slight color difference between the given color inputs and generated images. Force enabling sRGB color profile for Chromium should address this issue. fix #325
There's occasionally a slight color difference between the given color inputs and generated images. Force enabling sRGB color profile for Chromium should address this issue. fix #325
## [4.0.2](v4.0.1...v4.0.2) (2020-12-15) ### Bug Fixes * **main:** force enable sRGB color profile ([15eef1b](15eef1b)), closes [#325](#325)
🎉 This issue has been resolved in version 4.0.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Just tested it out and can confirm, it works like a charm! |
Thanks for clarifying the issue, moreover testing and confirming the fix @wojtekmaj! Really helpful. |
Describe the bug
I'm using a specific purple color: #4f14bc as a background color and in my images (tested both svg and png).
However this color comes out as: #3a1fb1 in PNG
And as #3c1eb0 in JPEG
To Reproduce
npx pwa-asset-generator Demo-Dot.svg ./bug/ --background "#4F14BC" --type png
npx pwa-asset-generator Demo-Dot.png ./bug/ --background "#4F14BC" --type png
npx pwa-asset-generator Demo-Dot.svg ./bug/ --background "#4F14BC" --type jpg
npx pwa-asset-generator Demo-Dot.png ./bug/ --background "#4F14BC" --type jpg
Expected behavior
icons and splash screens ending up with #4F14BC as color if I have used that as input.
I couldn't attach svg directly so I zipped it.
** original **
Demo-Dot.svg.zip
** outcome **
The text was updated successfully, but these errors were encountered: