logoalt Hacker News

tejohnsotoday at 2:53 AM4 repliesview on HN

Isn't most of the text on the page grey? It's not white, it's rgb(215,215,216). And the background is not black. Some worse examples are shown, but then the message comes across as "don't use grey unless you know what you're doing, like I do, because I'm using grey while I tell you not to use grey, but mine is okay."

Maybe aside from the unset option, something more specific about a minimum contrast threshold would be useful. Ideally the author wouldn't be breaking below that threshold themselves while explaining it.


Replies

quuxplusonetoday at 3:08 AM

That, plus the line "Or, you could just not do it [change your colors with CSS] in the first place which would look like this:" — followed by a super-duper-CSS-styled box thingie full of gray text.

tom_today at 3:35 AM

The background is indeed not black, but if it isn't actually white then it's close enough that the text, which i'm sure is indeed mostly actually grey rather than black, shows up well. I've seen worse.

cratermoontoday at 4:16 AM

Indeed the WCAG guidelines provide the following criteria

* The visual presentation of text and images of text has a contrast ratio of at least 4.5:1, except for the following * Large Text: Large-scale text and images of large-scale text have a contrast ratio of at least 3:1

Grey is not the problem. Low contrast is the problem.

show 1 reply