Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The WCAG calculations for contrast are complete rubbish, in my experience they don't reflect reality very well at all. I haven't been able to figure out why though, each of the individual steps looks reasonable.


Totally agree. WCAG 3 is moving to APCA, and is much better at reflecting reality: https://typefully.com/u/DanHollick/t/sle13GMW2Brp


It’s more what they’re not doing.

The main issue is that they linearise the sRGB colour space before adding together the components… and then never 'delinearise' it afterwards. Human brightness perception is non-linear and WCAG totally ignores it.

This is a collection of 'even' black-white gradients in different colour spaces.

https://docs.krita.org/en/_images/trc_gray_gradients.svg

LAB is pretty much the standard for a perceptually even colour space.

The sRGB gamma curve was chosen based on CRT mechanics… but it’s pretty close.

The WCAG calculations only make sense in a world where 'Linear TRC' is perceptually even.


That 0.150 purple on white is painful to look at, but the .548 yellow on pale grey is mostly fine... and why darken it all the way to the colour of, ahem, an infant's surprise?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: