With the recent introduction of native AVIF support, I’ve noticed a significant color shift (loss of saturation/washed-out colors) when Hugo processes flat vector graphics or text-heavy banner images into AVIF.
For context, when processing a PNG banner with a deep purple/blue background, the resulting AVIF file strips away the richness of the purple, making it look dull and greyish compared to the original.
I cannot see any difference. I’ve run this test site that uses your banner image on Windows 11 with different monitors, Ubuntu 24.04 with different monitors, and macOS.
git clone --single-branch -b hugo-github-issue-14896 https://github.com/jmooring/hugo-testing hugo-github-issue-14896
cd hugo-github-issue-14896
hugo server
EDIT: I see a slight difference in the banner image at the transition (border) between the two colors.
Here’s how my AVIF one looks on Firefox in Linux Mint. The purple background is brighter, and also slightly for the blue. I can also see the same on your first image
> Open Firefox and type about:config in the address bar. Accept the warning. > Search for gfx.color_management.mode. > Double-click it and change its value to 1 (this forces full color management for all web elements, untagged images, and CSS).
This actually worked. I remember having this issue on Brave last year and I also had to change the colour profile (which appears fixed in Brave now). Strange! Will diagnose this further with the Linux Mint team.
And the Problem is with Linux Mint! I had to set a colour profile at color>Add profile>Artifex Software sRGB ICC Profile. Then reboot the system.
Looking at Brave, I think the standard browsers shower the purple/blue as lighter by default for all cases, while in my case, Firefox shows the colours for PNG and WEBP darker, but the AVIF as lighter. The purple is #4c04a9 while the blue is #0284c7.
Maybe, because I have not used a Chromium browser in over a year, I did not notice the difference.