Shedding Light on the Dark Side of Dark Mode ๐Ÿ”ฆโฌ›

ยท

3 min read

Programmers love dark mode. This is a stereotype that exists for good reason... It just is true for a vast majority of the developer community, including me!

We think dark mode makes everything look super smart and slick. Be it laptops, PCs, or our phones, we default everything to use dark mode. Some of us even use browser extensions (this is a popular example) that convert the stubbornest of light-mode-only websites into dark mode. And this is for good reason: we do look at screens for longer than an average person and so often find light mode tiring to the eye and even blinding. A friend and I jokingly call it "flashback white" (referring to the common white flash transitions preceding flashback scenes in movies)

When so many of us software developers prefer dark to light mode with such intensity, it is bound to affect the software we build. Those more experienced will, of course, create software with a choice between both modes, but might end up testing their software using dark mode more often. So even if unknowingly, light mode, which is the norm outside programmer circles, ends up receiving lesser attention. Even worse, those of us just starting out on our development journeys, might end up creating our software with only a dark mode look (which I have to admit I have been guilty of).

If you're a fellow dark mode-r, you might think, "What's wrong with that? This is such a smart, subtle and legal way to make the world move over to the more superior dark mode ๐Ÿ˜ˆ" Uptil a couple months ago I would have agreed with this sentiment.

My eyes were opened when a non-developer friend mentioned that those with astigmatism (~50% of the world's population) like her, find it harder to read text in dark mode than in light.

Getting to know that dark mode isn't astigmatism friendly was surprising enough, but learning how widespread this eye condition is, was even more so. I almost felt guilty for every time I'd advocated for dark mode, with full faith in the idea that it was better in every way: be it from the point of view of eye health, or for simply looking cooler. I then did some research online on astigmatism (which I knew was the condition when the eye lens is not uniformly curved and hence slightly elongated rather than spherical) and it's relation to dark mode. I discovered that a phenomenon named "helation" is responsible for astigmatic eyes' blurry interpretation of dark mode screens. To put it simply, the vision of those with astigmatism is always blurry, but in dark mode, since there is lesser light reaching the eyes, the lens focus more, hence exacerbating the effect of their misshapeness, which is the blurriness!

What is the solution, then? Well, dark mode's potential problems don't cancel out those caused by light mode. There are also several subtleties regarding the exact colors used: off white text on a dark grey isn't as blurry to most people with astigmatism as pure white text on jet black is, so it'd be wrong to make any blanket statement about dark mode. Therefore, we can't really declare a clear winner between the two modes. The most logical way ahead is to always ensure a choice between the two (and maybe even more!) modes in all software for the greatest accessibility. Also, we should not let our personal preferences get in the way... Good work advice generally too!

Just as an aside, something else I found surprising was how me and so many others were not aware of an issue affecting half the planet. The answer is almost deceptively simple: most people with astigmatism themselves didn't realise that their preference for the more traditional light mode is related to their astigmatism. Only when they were told of the connection between the 2, did the difference between the legibility of text in both modes seem obvious to them. Hindsight indeed is 20/20, with or without astigmatism! ๐Ÿ˜

ย