RESOLVED DUPLICATE of bug 272579 275565
CSS opacity percentage being rendered incorrectly vs FF/Chrome
https://bugs.webkit.org/show_bug.cgi?id=275565
Summary CSS opacity percentage being rendered incorrectly vs FF/Chrome
tableau.scenes-0g
Reported 2024-06-17 06:33:24 PDT
Created attachment 471693 [details] HTML with a reproducible case Text colors with opacity are being rendered differently on Safari vs Chrome/FF when the text has: 1) a custom font 2) a weight above 500 that is not declared in the font-face 3) a color that contains an opacity (e.g. rgba(), hsla(), color-mix, etc) See attachment for a minimal reproducible case. The "gray" text is gray on Chrome and FF, but Safari renders it much closer to black. Black with an opacity 40% appears as close to black. The drop-off as the opacity drops is not linear, it's more like exponential.
Attachments
HTML with a reproducible case (19.78 KB, text/html)
2024-06-17 06:33 PDT, tableau.scenes-0g
no flags
Scale to see differing opacity of rgba vs opactiy attribute (20.68 KB, text/html)
2024-06-17 06:55 PDT, tableau.scenes-0g
no flags
tableau.scenes-0g
Comment 1 2024-06-17 06:55:03 PDT
Created attachment 471694 [details] Scale to see differing opacity of rgba vs opactiy attribute I've added a table so you can see how the opacity scale from 10 to 100 works correctly on Chrome/FF (same between rgba() vs opacity), but results in different output on Safari.
Alexey Proskuryakov
Comment 2 2024-06-17 12:55:01 PDT
This seems more like a general font rendering difference to me, given that unsettled text looks different between the browsers. The opacity issue may also be real, just seems harder to see.
tableau.scenes-0g
Comment 3 2024-06-17 13:20:14 PDT
I agree that the different rendered weights make it a little tougher to see the cause here. However, my second attachment shows the discrepancy clearly when rendered on WebKit. Also, if you look at the hex values of the 10% and 20% in `rgba` vs `opacity` approaches, you can see that the problem is solely with the opacity: % rgba opacity 10% A6 (166) E5 (229) [255*.9 = 229.5] 20% 68 (104) CC (204) [255*.8 = 204]
Vitor Roriz
Comment 4 2024-06-17 15:30:51 PDT
tableau.scenes-0g
Comment 5 2024-06-17 15:56:38 PDT
Good spot! Yes, I think this is a duplicate. I’ll add my diagnosis to the other bug and close this one.
tableau.scenes-0g
Comment 6 2024-06-18 13:09:01 PDT
*** This bug has been marked as a duplicate of bug 272579 ***
Note You need to log in before you can comment on or make changes to this bug.