There are few debates as contentious in the development and UX world as color schemes. Among developers, however, there seems to be a pretty significant skew towards coding in a light on dark mode (This poll found that ⅔ of surveyed developers prefer to use a dark mode in their code editor).
Dark mode advocates cite a number of benefits, including reduced eye strain, better sleep, and reduced power consumption. While many of the arguments for dark mode undoubtedly have merit, there is far from a scientific consensus on many of its benefits.
While we might think of dark mode as a relatively new trend, it was actually the original color scheme that was used for computers. Most early computers used light text on dark background in order to save power. As computers became more consumer-friendly, however, developers began to use black text on white backgrounds to imitate the black ink on white paper that most people were used to.
More recently, countless devices, websites, and apps have added support for dark mode for both optical and aesthetic reasons. Software developers, who spend most of their work time staring at computer screens, have been some of the most fervent advocates for dark mode.
The first argument for dark mode that's worth taking a look at the claim that dark mode is better for your eyes. While there is no doubt that using light mode in a dark room can be blinding, there also seems to be evidence that our brains are just better at reading and comprehending black text on a white screen.
For example, A 2013 study by Psychologist Dr. Cosima Piepenbrock looked at how adults with normal vision performed at visual acuity and proofreading text across dark and light color schemes. The study found that:
"Pupil sizes were smaller and proofreading performance was better with positive(Dark on Light) than with negative(Light on Dark) polarity displays"
In other words, for substantial digital tasks where you are attentively reading text(Such as coding), *having dark text on a light background (i.e. light mode) can help you focus and comprehend better. *
What this means in practice is that your eyes and brain may have to work harder to read and write code if your IDE is in dark mode.
Another commonly cited claim is that using your IDE in dark mode reduces blue light consumption, and therefore can help you sleep. While dark mode definitely does reduce blue light, blue light may not be the primary culprit that actually messes up your sleep schedule.
A 2019 study by the University of Manchester found that blocking blue light only slightly improved people’s sleep patterns. Instead, the real culprit is the use of warmer colors(Like reds and yellows) at night, which trick our brain into thinking it's daytime.
If you want to get better sleep, dark mode may in fact help, but the real solution is to not use screens altogether before going to bed.
Another argument for using dark mode in your IDE is that it can save you money on your power bill. If you are using an OLED display, which most modern monitors do, then this is definitely true.
It is probably important to note, however, that if you are developing software that is computationally heavy, like rendering 3D graphics or training and using machine learning models, the reduced power consumption from dark mode probably won’t make any sort of noticeable dent in your power bill.
Regardless of what you personally prefer while you code, you should always add support for both dark and light modes in the software that you build. Many people who have certain color blindness or eye conditions can find one of these themes extremely hard or even impossible to use. Giving your users flexibility is therefore very important.
In summation, the jury is still out on whether dark mode is actually better for coding. While it might save you a tiny amount of power and, if you are using it at night, marginally help your sleep schedule, these benefits don’t seem to be that substantial. In addition, reading dark text on a light background may help you read and write code more efficiently.
Your theme therefore should come down to what is best for you, because there is not a scientific consensus that one color scheme is going to be better than the other. If you think dark mode looks sleeker and you are doing a lot of coding at night or in the dark, then go ahead and use dark mode. If you prefer the readability of dark text on a light background, then go ahead and use light mode.
So what do you prefer and why? Personally, I think dark mode is more aesthetically pleasing but I definitely notice how it can be harder to read.
Let us know in the comments what you think!