top | item 439562

Ask HN: Do you program in black or white?

16 points| Jakob | 17 years ago | reply

I just switched from Eclipse to TextMate a month ago. With that change I also wanted to try out coloured text on black background.

Interestingly it’s a huge improvement for me. I seem to be much more focussed. It’s also really pleasing to look at code now.

Did you have similar experiences? In which colours do you program?

40 comments

order
[+] hbien|17 years ago|reply
I started out with dark backgrounds because of vim + Linux. The default terminal was black. Now I use the dark background w/ color text for all my editors/IDEs.

I tried switching to the white background for a week, but it really hurt my eyes. I had to switch back after a few days.

[+] PieSquared|17 years ago|reply
Same experience here. I start having difficulty coding when the background is too bright, or even when the text is too bright on a black background (I had the text be a light gray for nearly a year, and I never really realized it wasn't white. Then when I looked at white on black code, it looked very bright and unpleasant to read.)
[+] invisible|17 years ago|reply
Besides the "easy on the eyes" feel of a dark background, I also love (in Textmate) using a tinge of transparency (opacity at 96%). It's really handy when you're trying to reference things in other windows and aren't sure if you formatted it exactly right. I think with a white background that would really look bad and easily distract.
[+] maco|17 years ago|reply
I used to think that green on black was the way to go because of that whole "ow, bright light, pain, my eyes!" thing, but it turns out that you can avoid the pain of bright screens and extend your battery life by just turning down the screen brightnesss. I keep mine as low as it goes while still having the backlight on. Though, in a well-lit room, it is possible to read black text on white with the backlight off as well, thus hyper-extending battery life.
[+] notaddicted|17 years ago|reply
I use light background. I feel like I have to. Any time I switch from light text to dark text it takes time for my eyes to adjust. So when I'm looking up documentation etc everything need to be the same. Even the bar at the top bothers me. SO I use the black on white.
[+] jballanc|17 years ago|reply
I've been using dark/black backgrounds for literally years. The question that most interests me now is warm vs cool colors for syntax highlighting. Without realizing it, I had been using primarily warm tones for a long time. Then, I installed MacVim and started using the default dark bg theme, which uses cool tones... I kinda like it!
[+] zacharydanger|17 years ago|reply
[+] dejb|17 years ago|reply
Interesting point. So perhaps the implicit suggestions is to randomise your backgrounds and colour schemes to improve productivity. Maybe if you told others that it was part of an experiment and the results were 'being monitored' it might work for a while. Otherwise I don't think so.
[+] Laurentvw|17 years ago|reply
I recently switched from a black & white scheme to a colored scheme. As of now I'm enjoying a black-greyish background with some nifty colors.

IMO, colored code makes the process much more fun. I'm not sure if it makes me more productive though, but I wouldn't rule it out.

Small screenshot: http://photos-f.ak.fbcdn.net/photos-ak-snc1/v2102/219/106/34...

[+] tarmac|17 years ago|reply
what editor is this?
[+] Goladus|17 years ago|reply
I don't like white or black backgrounds, though I prefer white to black in a typical windowed environment. If my editor has the full screen it doesn't matter, but I don't like menus and other windows being a lot brighter than the editor. It's either distracting, or it's a jarring readjustment every time I have to change windows.

If it weren't for syntax highlighting, I'd prefer slight color variations, with not much preference towards dark-on-light or light-on-dark. If I have a lighter background I usually prefer the text to be black. If I have a darker background I usually prefer the text to be slightly colored. In web terms, an example would be "99DD99" text on "303030" background, or "99DD99" background with black text.

[+] MrRage|17 years ago|reply
I've got to put a vote in for white backgrounds. I find dark background terribly hard to read, especially with colored text. White backgrounds have a higher contrast with the text. I also turn the brightness down on my monitors, so I don't feel it's too blinding.

I also can't stand it if the syntax highlighting is too colorful. I like some coloring for reserved words, type names, comments, and string literals. Other than that black on white.

What I find more important that color schemes is having a nice font. If you're on Windows, and not using Consolas, you're missing out big time. Consolas is actually designed to look good with sub-pixel rendering. If you can't use Consolas, Bitstream Vera Sans Mono is a nice second.

[+] s3graham|17 years ago|reply
I didn't realize it for quite some time, but what I actually use is:

  - dark means "brain: use vim keys" (:colo darkblue)
  - light means use arrow/CUA keys, a la most "normal" applications.
(ps, please add <ul>/<ol> formatting)
[+] brandonkm|17 years ago|reply
I actually program with a navy blue background in some languages and a white background in others. With ruby, python I have a blue background in vim and with xhtml, css, and javascript I use a white background.
[+] MaysonL|17 years ago|reply
Strange - I've been using black (lately w syntax coloring) text/white background since I was first able to (early '80s - VT100 days) after using white on black for most of the 70's.
[+] awt|17 years ago|reply
I like a white background. The color schemes for black backgrounds always seem to be off for one color or another.
[+] raquo|17 years ago|reply
#222 for background, something like #eee for common text, and light pale colors for vars/stings/etc. I found that #fff text on #000 bg hurts even more than plain black-on-white.

Also, overhighlighting kills my ability to focus - I use at max. 4 colors

[+] there|17 years ago|reply
i had a vt510 connected to an openbsd machine in my bedroom about 10 years ago and did most of my unix work with it. since it can't display colors, i setup mutt, vim, tin, epic, etc. to only use bold/underline/reverse attributes for highlighting instead of different colors.

10 years later and i'm now using openbsd on a laptop and typing in an xterm instead of a vt510, but i still only use bold/underline/reverse in all of those terminal apps. however, i did switch from grey text on a black background on the vt510 to black text on a white background in xterm, but that's probably just because it's the default on openbsd.

[+] mrtron|17 years ago|reply
Terminal I go dark - Textmate I go light.

Maybe I should switch to dark - it is a bit nicer on the eyes I think.

Edit: Switched over Textmate to a dark theme, and I am glad for the reminder. I don't know why on this new machine I didn't have it set that way!

[+] russell|17 years ago|reply
I use black or syntax coloring on gray or ivory background. My eyes are old and the contrast with colors on black is too low for me to read easily. I prefer the off white background because pure white is too bright.
[+] johngunderman|17 years ago|reply
It depends on the language I am programming in.

Java - white (Eclipse)

Python - Black (gedit)

Lisp - White (emacs)

Ruby - White (TextEdit)

C/C++ - Black (gedit)

I have noticed that certain text editors have dark themes I like, whereas other dark themes just hurt my eyes. I have no true preference, only what I am used to.