loading...

Discussion

markdown guide
 

My bet is that is that most people think that it's easier on the eyes. Or maybe just that it looks cool. 😎

Lately I've been allowing my OS to switch between dark and light automatically based on time of day, and then configuring VS Code to mirror the OS theme (settings > "Auto Detect Color Scheme"). The trick with that approach is that it's nice to find an editor theme that has both a dark and a light variant that go well together (not required, but it's nice), which I use themer for.

 

for me it's because most of the screen taken by the background and not the code, so looking at a screen that pitch light 12h a day is just to much for my eyes. Try just for 1 minute looking directly at a light bulb, it hurt.

 
  1. Better syntax highlighting contrast
  2. Better selection of syntax highlighting themes
  3. Easier on the eyes (bright = strain)
  4. Less jarring if surrounding area isn't well lit. Bias lighting can help fix this for those who prefer light mode.

As an added benefit. On OLED displays (ex mobile) dark mode can greatly reduce power consumption.

 

Syntax highlighting is usually easier to read in a dark theme. By most measures, bright neon colors on a black or dark background have better contrast than dark colors (navy blue, brick red, etc) on a white background. When your job involves as much reading as software development does, making it fast matters, and it's easier for most people to read quickly when you're dealing with better contrast.

There are other reasons of course, but that's one that I feel does not get mentioned enough, possibly because many people just don't think about it.