There has been some discussion about Web safe colours and their impact on accessibility. There do not seem to be major issues around the accessibility of Web Safe colours.
However, there is another issue to be considered. Currently, web safe colour may be the the safest way to get an accurate measuring contrast with a tool because on some monitors, non-safe web colours will be dithered to simulate the desired colours. For instance, on a monitor with 256 colours it is possible that “orange” would be a dithering of red and yellow pixels side by side.
So if the background is orange (using that formula), the contrast analyzer would choose either a red pixel or a yellow pixel. This will affect the results of the contrast test depending on which pixel I test even though the perceived background of orange is unchanging.
When measuring foreground and background with dithered images, measure the pixels in the foreground and background which will give the “least” contrast, and make sure that that than 5:1… Below are some illustrations.

Above is a dithered orange background. It is made up of red and yellow pixels mixed together side by side. The analyzer will only choose one pixel, either red or yellow.

Above are the analyzer results which depend on which pixel I choose. One test renders red the other renders yellow. But the perceived background is orange.
If the foreground is Blue (Background red), the test will render a fail at 2.5:1
and if the foreground is Blue and the Background is Yellow the test will render a pass at 8:1

But the perceived background is orange.
I do not propose that the WCAG require web safe colours.
My proposed fix is to create a button on the analyzer that averages several pixels. This would be called something like a "dithering measurement button" on the analyzer. It would calculate an average between the red and the yellow, to come up with something closer to what an orange background would render. So if the user is measuring a dithered background or foreground the user could press that button and the selection tool would sample a bit wider area (say 4-5 pixels) and average them to come up with an more accurate “perceived: contrast.
I’m not sure what kind of amendment or note I will propose for Success Criteria 1.4 but I think we need to make users aware of this. Perhaps we should require that the user select t the pixel which will give the “least” contrast, and that still needs to be greater than 5:1 with the foreground.
David MacDonald
access empowers people...
...barriers disable them...