Re: [csswg-drafts] EOTF correction / standard for alpha? (#12492)

For visualization purposes, here's a quick demo. This image has four quadrants, each of which contains:
* Some text, the same font family, size and weight in all quadrants (SourceSans3VF SemiBold, 16px)
* A 1px thick line, aligned with image pixels
* A 1px thick line, with a 0.5px offset vertically
* A vector line with 2px thick stroke

<img width="230" height="266" alt="Image" src="https://github.com/user-attachments/assets/680a40df-9991-4ca5-8105-3a68e4308df1" />

Note how when using sRGB gamma, anti-aliased drawing appears to be thicker or heavier when drawing with dark on light, while it appears thinner or lighter when drawing with light on dark. Web designers often compensate for this by choosing heavier weight fonts or higher contrast colours for "dark mode" web design compared to "light mode".

Similarly, you can see how the 0.5px offset 1px thick line (effectively a 2px thick line with 50% alpha) is much lighter in linear light than sRGB. If someone is using `text-color: rgba(0, 0, 0, 0.5)` to get grey text on a white background, their text would become much lower contrast if compositing was switched to linear.

-- 
GitHub Notification of comment by kepstin
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12492#issuecomment-3528535654 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 13 November 2025 16:07:49 UTC