Programming with white text on black background?

It's actually white on black, or rather green or amber on black, that is the traditional way. I've used them all. :)

I believe that the use of black on white started in word processors, because it's a lot easier on your eyes when you alternate between looking at the screen and looking at source material printed on paper.

Also, the contrast between the screen background and the surrounding lighting should be small, so a white background works best with the well lit room most people use computers in most of the time. If you are programming in the darkness a black background would give less contrast, but then it's more a question of why you don't have proper lighting in your room...

There are of course personal preferences than can affect your choise of color setting, and your eyesight (or lack thereof) might also make one setting better than the other.


There is an endless debate on slashdot one can go through for all the unintelligible technical details (the more technical analyses seems to favour dark on light side though).

This article, though about web designing, warns about the hazards of mindless black theming. The important aspect I understand is that the font is more important than coloring schemes. There is also disadvantage for black (not dark in general, but just pure black) background with white font if font is thin, since black creeps on to white and font would look a lil' blurry.

Despite all that, personally I find reading on darker background much easier for eyes. I don't think there is a definite answer for "light font on darker background" or vice versa. It will have to depend on personal tastes and habits more importantly. For sure, the right scheme lets the font (the writing) to project to fore and subdues the background. Now ask yourself is it dark on light that does this or light on dark? Here is the key, in that advocates who vouch for similarity with print suggesting that black outshines the white on paper, is blind to the fact that it is not the situation when it comes to electronic screen. Here the intensity of white beams on your eyes is much higher when compared to black.

And there is nothing like a best background color or fore color, but its the combination that matters. Right combination gives the right contrast, and contrast matters. And contrast should be sufficiently high, but not enough to be straining. Pure white on deep black can be hurting (the contrast being significantly high) but at the same time white on dark green is soothing. The same goes with amber on black.

Also when having a dark background it should be pale and not intense, so something like dark grey or teal will be better than black which in turn will be better than blue, red etc. Black on grey is excellent.

The solarized theme actually is after some good round of testing, going after their website. The good thing I love about Notepad++ is that some of the better known themes like solarized, zenburn, vibrant ink are available built in with the style configurator. Obsidian is the best without a doubt btw! :) Catch it for Visual Studio here.


It seems to be a preference thing and possible environmental thing, honestly. You'll find people who believe each method is superior.

I know that personally, I have coded since the green-on-black and amber-on-black terminals were around, and now I use light gray text on black backgrounds wherever possible. I find black backgrounds to be extremely comfortable on my eyes even for very long sessions, but white backgrounds are very fatiguing. I have heard it described as "staring into a 100 watt lightbulb" and that's how it feels to me.

Room lighting can potentially have a significant effect also. Brighter rooms may lend themselves to brighter backgrounds, and darker rooms to dark backgrounds. It reduces the need for your eyes to struggle to switch between wide and narrow pupils required for bright then dark then bright as you occasionally look away from the monitor to relax your eyes (you should always do this, right?).

The best advice is to just try both, give it a week or so, and decide which you like better. If you find both the extremes are glaring, try using a more subdued theme than pure whites and pure blacks, try some softer grays.

Tags:

Editor