colord icon indicating copy to clipboard operation
colord copied to clipboard

Offer APCA as contrast measurement feature

Open jwbth opened this issue 6 months ago • 0 comments

Request

The contrast guidelines of WCAG 2.1 are outdated and inadequate in many cases. Its projected replacement in WCAG 3.0 is Accessible Perceptual Contrast Algorithm (APCA). It is already included in many tools (e.g. offered as an experimental feature in Chrome DevTools).

I suggest to implement that algorithm in the a11y plugin of Colord.

Why would people want to use another method in Colord?

My immediate source of discontent is this:

In one of my designs, I'm trying to choose color for text: black (#202122) or white (#ffffff) – depending on which has a bigger contrast with my background color (it is chosen randomly). So, Colord often misleads me in this situation, relying on WCAG 2.1. APCA is known for better accounting for contrast of dark color pairs than WCAG 2.0. Indeed, its calculator gives diametrically opposite results:

WCAG 2.1 APCA
image 4.37 37.2
image 3.68 -69.5 (the absolute value, 69.5, matters here)

Feel the difference! This forces me to look for tools other than Colord until Colord is updated.

jwbth avatar Jul 30 '24 20:07 jwbth