Ending the color theme debate

One of the never ending discussions in the programming circles is the debate on the best text editor color theme. Should I use a dark theme like the elders intended or is a light theme a better choice for my eyes?

There are plenty of theories and pseudo-scientific answers for what your preferred color theme should be, but somehow these discussions never reach any conclusion. There will always be some programmers claiming that a light editor theme drills holes into their eyes and for this reason the only usable theme is dark. On the other hand you will also be able to find programmers who will shake their fists at the disbelievers, claiming that the only theme they can use is a light theme. Pick any darker color than white for a background and they will be straining their eyes, getting blinder by the second.

Surely if a light theme was burning holes into your eyes, nobody would ever be using it. Somehow nobody claims that they prefer staring directly into the sun over wearing shades while doing that. Similarly, nobody argues about preferring to cook in a dark kitchen over cooking in the one that is brightly lit. Yet, the programmers seem to do just that.

How come? Does it all boil down to personal preferences? If it’s a matter of personal preference, then why do the majority of programmers I know prefer to use a dark theme 1? I think there are a couple of reasons behind that:

The first reason I can think of is due to the power of defaults. A dark theme is usually a default theme in most editors, and once you get used to something, you most likely don’t want to change it unless you have a very good reason for that. If the theme colors don’t bother you (e.g., due to red-green color blindness), you probably won’t bother tweaking your color theme at all.

The second reason, which I believe plays a much larger role in choosing your theme, depends on the amount of ambient light that is present in your office. The darker the office the darker the editor theme could be and vice versa; with lots of ambient light in the office, very dark/low contrast themes become harder to use. I am not aware of any scientific research to back up that claim, but I do have an anecdote ready right under my sleeve.

I used to be a big fan of dark color themes. My operating system theme was dark, my browser theme was dark, my IDE theme was dark and my terminal theme was dark. I never questioned that decision, since I liked the colors and the consistent look of my environment.

During my student years I was usually programming in the evenings when I was done with my obligations and it was already dark outside. At the time I was still learning to touch type and I specifically bought a backlit keyboard just to avoid turning on the light when my hands got lost on the keyboard. Sometimes I tried to use a light editor theme (mostly out of curiosity), but I never really liked it. The white background was just too bright for my taste 2.

Once I’ve become a professional programmer, I was “forced” to work during the day. As you may know from experience, people fresh out of school are usually not handed the best office in the building. Most of the time they are handed whatever location that is still free and for quite some time I worked in an office that didn’t get a lot of natural light in. The lack of strong natural light didn’t really bother me, since I was already used to working in a dark environment.

After working in that cave for a few months, I managed to switch the team and move to a much nicer office that had plenty of natural light coming in. This office was facing the east side, therefore the sun was only shining directly into the office early in the morning. Since I never start working that early and I wasn’t sitting near the window, the sun never bothered me and I kept using my battle hardened dark theme.

A couple of years later I started working from home and the outside light direction changed once again. My desk is facing south and the window is right behind my monitors. This light situation is great for video conferencing since you don’t need any extra lightning to have your face brightly lit, but if the outside light is strong you may have troubles seeing what is displayed on the screen.

Lo’ and behold. Dark low contrast themes are no longer comfortable when the power of one sun is shining directly into your eyes. You are basically left with two options: you either draw the shades and turn your room into a tomb, or you can try to find an editor theme with higher contrast.

Since I prefer to work in a bright room throughout the day, I went with the latter option. Imagine my surprise when I switched to a light theme, that was using a black text on a white background, and I was suddenly able to read the text without squinting or waiting for my eyes to become adapted to the low contrast theme colors. The light theme was such a massive improvement that I immediately switched to use a white background everywhere and not just in the text editor. Given my current light conditions the light theme is clearly better.

With that written down, I think I have finally realized why are there so many arguments about the light vs dark color theme. Different programmers work under different light conditions and there is no right or wrong choice here. I just wish that next time this debate pops up, they would add more details about the light that is present in their office.

Hopefully this post will make you think about the ergonomics of your work environment and not just stick with whatever are the default settings. While there are some studies that are supposedly proving how using a light theme is better for your eyes 3, I don’t think these older studies are particularly relevant considering they were done on the CRT displays. If you are still using them in the parlance of our times, I think the color theme is the least of your problems.

Patient: doctor it hurts when I do this.

Doctor: then don’t do that.

Notes


  1. This claim comes from looking at what the majority of my coworkers are using. When I see someone that is using a light theme, it’s usually because they are using Eclipse IDE where the dark theme is broken (half of the dialogs are unreadable due to a dark text on dark background problem and that has been broken for ages). ↩︎

  2. I don’t like Solarized light theme either. I can’t quite put my finger on what is wrong there, but I have a hard time distinguishing between their choice for yellow, orange, red and green colors. They all look similar to me. ↩︎

  3. See also a discussion on this topic: Is dark or white color theme better for the eyes? ↩︎