

Ask HN: Your code editor, black on white or white on black? - tbassetto
https://docs.google.com/spreadsheet/embeddedform?formkey=dEdwNEJkVk9jempXcHF2UUYtRlZTQ3c6MQ

======
idan
There's a solid usability reason why inverse (light-on-dark) is better for
anything with syntax highlighting, like terminals and code.

Many colors of the spectra have poor contrast with white when used in an
emmisive light context, like your screen. Yellow on white is illegible because
it lacks contrast. The range of distinguishable, saturated colors is much
larger on a black background, and you can comfortably add a second palette of
less-saturated (dimmed) colors without sacrificing legibility. Your range of
choices on light backgrounds is far more limiting.

For situations where there are a large number of potential "highlights" which
must be distinguishable, it makes sense to have access to a larger palette of
color options.

~~~
w0utert
I agree about the point you make about contrast and syntax hihglighting, but I
disagree with your conclusion.

In my experience dark backgrounds with light text are more tiring on the eyes
in long coding sessions. Text gets blurrier quicker than when using a lighter
background. I came to this conclusion after years of using dark backgrounds,
and having switched to light backgrounds.

Personally, I think the question should not be 'white background or black
background', because IMO a light gray or blue background is even better.
Borland was on to something with their C++ and Pascal IDE's ;-)

~~~
rcfox
> Text gets blurrier quicker than when using a lighter background.

Perhaps you need to get glasses. I've never had text go blurry on me,
regardless of the colour theme or duration.

~~~
bilban
I can't read a white background unless I'm in a very bright room. Off whites
are better for me. But personally I prefer light on dark. But it's a personal
thing.

I rue the day the browser default background colour changed from being light
grey to white.

~~~
derobert
You may want to lower your monitor's backlight level (if LCD) or
brightness/contrast (if CRT).

~~~
bilban
Thanks - but it is pretty darn low already.

------
jjm
I go Solarized <http://ethanschoonover.com/solarized>

~~~
Derbasti
Well, light or dark? I go Solarized Light.

~~~
jjm
Light, which I voted for.

Been using it for >1yr and so far so good, more soothing to look at. You?

~~~
uggedal
I've also been using solarized light in vim, urxvt, and Awesome WM on Linux.
On Windows at work I use solarized light in Putty, Mintty, Eclipse, and Gvim.

~~~
kingphilip
I'm using eclipse and don't see an option for installing it on the Solarized
site. Did you just set up your own color scheme that matches it?

------
bane
I wouldn't say white on black, more like grey and some other muted colors on
black.

I remember making the switch from black on white. I was working a contract job
with ungodly hours and my eyes were pretty much always red and irritated. I
started to notice certain colors on the screen were particularly irritating so
I started to fiddle with the color scheme and eventually ended up with the
light on black scheme.

It was astonishing how much it helped my eyes.

~~~
edoloughlin
You should try f.lux -- <http://stereopsis.com/flux/>. It really makes night
time computing easier on the eyes.

~~~
pdaddyo
I concur - I've been using this a while and it has made a huge difference to
evenings spent in front of screens, and available on all platforms.

~~~
maxer
helps if you have to drive home from the office after 12 hours, colleagues
complained not being able to see other cars clearly

------
phzbOx
I'm surprised nobody talked about Wombat. It's the theme I use everywhere I
can. It's on a dark gray background. Here is a screenshot:

[http://dengmao.wordpress.com/2007/01/22/vim-color-scheme-
wom...](http://dengmao.wordpress.com/2007/01/22/vim-color-scheme-wombat/)

~~~
vivekn
I use wombat too, its easy on the eyes and a very aesthetically pleasing color
scheme.

~~~
donald_draper
Customized Wombat, yep.

~~~
minikomi
Customized murphy.. ( contrast junkie! <http://i.imgur.com/CEY5P.png> )

------
ghc
I have this (perhaps mistaken) notion that when I'm staring at a screen for 12
hours straight, it's better for my eyes to be looking at a mostly dark screen
than a mostly lit one.

At the very least, thanks to that link a year ago about how google would save
electricity for the world by adopting a black background, I know that I'm
saving the environment!

~~~
DaveChild
> At the very least, thanks to that link a year ago about how google would
> save electricity for the world by adopting a black background, I know that
> I'm saving the environment!

Sadly not, at least not with flat panels. Google responded to the "blackle"
think on their blog - [http://googleblog.blogspot.com/2007/08/is-black-new-
green.ht...](http://googleblog.blogspot.com/2007/08/is-black-new-green.html)

~~~
ghc
I was mostly joking about the energy savings, but yeah, you'll have to pry my
Trinitron from my cold, dead hands.

------
djbender
I was all about white on black until I realized that I keep being visually
fatigued by flipping back and forth into a webpage that was black on white.
For me, unless my entire workflow can be white on black, I stick with black on
white.

Maybe it's just me but I also find black on white more legible at low
brightness display settings as well.

~~~
cowpewter
Same with me, though I prefer a very soft grey to full on white. Too many
webpages have white backgrounds, and it's painful to flip from a dark editor
to go look something up on a glaring white Google.

I use a slightly customized iPlastic in TextMate.

------
paulrouget
Thank you for answering the survey! Results: 63% dark theme, 37% light theme:
<http://paulrouget.com/e/colorssurvey/>

~~~
city41
The survey was posted at ~4:30 am MST and closed before I woke up. Your
results are very European and Asian biased :)

------
patrickk
Xcode midnight theme, dark background.

[http://i1-mac.softpedia-static.com/screenshots/Xcode-
Midnigh...](http://i1-mac.softpedia-static.com/screenshots/Xcode-Midnight-Big-
Theme_1.jpg)

To activate, go Xcode >> Preferences >> Fonts and Colors and pick midnight.

~~~
erikb
Just a tip: try background without completely black or white backgrounds.
something like very dark gray or beige feels way better and also seems to work
better with a lot of colors and looking at the screen all day long.

------
rooshdi
Monokai <http://www.monokai.nl/blog/2006/07/15/textmate-color-theme/>

------
davidjhall
My original editor was Atari Basic so I try to do white on blue whenever I
can. Nostalgia dies hard.

------
blue1
I've found that black on white works better (for me) in daylight, and white on
black in a dark room.

~~~
mhw
That's most likely because ambient light reflections are more noticeable when
reflected by a dark screen than a light one. I do much of my coding on the
train to and from work where the lighting is quite harsh and the angles
unpredictable, so it's a light screen all the way for me.

------
hellweaver666
I tend to use a light to medium grey on black because I don't like the mega
contrast of white on black. But for the purpose of your survey, I answered
'white on black'.

~~~
wollw
Likewise. Also, I don't like highly saturated colors. I've tried a few
different color schemes and while I did like Solarized Dark I keep coming back
to Zenburn[1] for its muted, low contrast palette. I haven't found anything
better.

[1] <http://slinky.imukuppi.org/zenburnpage/>

~~~
tincholio
+1 Zenburn is awesome for long sessions in fron of the editor.

------
nassosdim
I hope that was _just_ a matter of preference for me but having enough eye
floaters, I find myself suffering less while working with darker backgrounds.

~~~
5l
Do you wear contacts? I've had the same problem with dozens of floaters
swooshing around and got to the point where I had custom dark-background
stylesheets for everywhere, but found that I could mostly tolerate white
backgrounds again with glasses.

Needless to say I still use a dark background in my editor.

------
dexen
Black on light sandy color #FFFFEA
<http://en.wikipedia.org/wiki/File:Acme.png>

------
ScottBurson
I have my XEmacs set up to use light green (#88FF88) on dark blue (#000060). I
find this very relaxing and easy to use. I've used this combination for over
20 years.

Pure white on pure black is too contrasty.

Having about the same amount of blue in the foreground and background keeps
chromatic aberration, which is worst in the blue range, from being noticeable.

------
TheCapn
At work my stuff is mostly done through puTTY, I set up different profiles for
our Dev, QA, and Prod equipment that use green/yellow/red themes respectively.

At home its default Eclipse theme (light) but that's mostly because of pure
laziness. This thread has been a good reminder to change that after my
reformat this holiday :)

------
goldmab
I used light on dark for a long time, but now I have a Mac with a glossy
screen, and a dark background makes it really easy to see reflected objects.
So I have switched to dark on light.

------
VMG
Eclipse: black on white

Terminal: white on black

I tried to go black on white all the way a while ago, because it is annoying
to switch between eclipse + websites and the terminal.

It seems however that the default gnome-terminal palette and most programs are
optimized for white on black. With a lot of effort I found an acceptable
256-color scheme for terminal vim, but I gave up and reverted when the output
"ack" became unreadable.

~~~
mihn
thumbs up! using same seutp.

------
amanuel
I use Vibrant Ink. I like the clarity of it and port it to any enviro I use.

[http://alternateidea.com/blog/articles/2006/1/3/textmate-
vib...](http://alternateidea.com/blog/articles/2006/1/3/textmate-vibrant-ink-
theme-and-prototype-bundle)

Font: inconsolata of course.
<http://www.levien.com/type/myfonts/inconsolata.html>

~~~
CodeMage
Is there a port for IntelliJ IDEA?

------
cawhitworth
Black on white, because then there's less contrast between my main focus of
attention (my monitor) and my environment (a fairly brightly lit office).

------
tete
Besides good colors, I think one should also choose nice fonts. I use these:

<http://www.proggyfonts.com/>

Found it here (also has lots of other great fonts):

<http://vim.wikia.com/wiki/The_perfect_programming_font>

------
JonnieCache
Used to use the railscasts theme. Now using the default sublime text 2 theme,
which appears to be fairly similar to solarized dark.

------
slmbrhrt
Light text on a dark background.

<http://www.vim.org/scripts/script.php?script_id=1891> vividchalk

<http://www.vim.org/scripts/script.php?script_id=1143> inkpot

------
dfan
My general observation has been that people who like to work in the (relative)
dark like dark color schemes and people who like to have lights on like light
color schemes.

I personally enjoy a black-on-white color scheme, but if I were in a dark room
I'm sure I would find it very fatiguing on my eyes.

------
skanuj
Please make the results available too.

------
protomyth
I generally like black text and a white background, but I also tend to use
green text on a black background for some items.

For terminals at one job, I had red backgrounds for production, yellow for
test, and blue for development. It kept me from being super stupid.

------
mhd
Depends a lot on the general setup. On my Mac, it's often a white(-ish)
background, whereas on a shell-heavy Linux desktop I keep with a general dark
look and feel.

But lately I surprisingly often turn to yellow on blue (TP-like), without
syntax highlighting…

~~~
bilban
I switch to light on dark depending on ambient conditions, my study is really
gloomy and I work at night, so a bright screen blinds me.

On OSX10.4 at least I use the accessibility switch for this - sadly the anti
aliasing looks worse with a dark background.

------
nhebb
Light on dark is nice except when I have other screens open - which is most of
the time. If my text editor has a dark background, I find the lighter
backgrounds in the periphery of my vision to be more distracting. Hence, I end
up using black on white.

------
maarten
White on black for me. Since a few weeks the twilight256 theme is enabled in
all my editors (ST2/Vim/Textmate) and it's great with an non-font-smoothed
Courier New in the terminal (Vim) as with a bigger smoothed 'Monaco' in
ST2/Textmate.

------
jrubinovitz
White on black. Black on white makes me feel like I'm writing an English
paper.

------
slyfox
I go for vim.desert <http://hans.fugal.net/vim/colors/desert.html> (whitish
gray on dark gray) for my editor. Terminal is gray-on-black

------
bilban
I think you should just leave it down to your desktop defaults, that should
ideally be configurable in one place.

It's annoying going through each app setting them up individually.

Each to their own.

------
Shivetya
After being on IBM systems for so long I have always enjoyed Green on Black.
Green is less harsh than white and it allows more colors to be used to high
light items than white on black or black on white.

~~~
kbutler
But the pink afterimage was always annoying - I much preferred the amber
monochrome monitors that came available.

I still use a "wheat" on black for night-time reading on my iphone...

------
snth
I use the 'moria' colorscheme, with a light background.

<http://www.vim.org/scripts/script.php?script_id=1464>

------
balakk
I settled with this:

<http://studiostyl.es/schemes/coding-instinct-theme>

with some customizations.

------
Joeboy
I seem to alternate between firing up gvim (white background) and vim in a
terminal (black background). I don't really notice a difference in terms of
readability etc.

------
swah
I use light, but dark bg has a really big advantadge that you can see many
different foreground colors. Its really hard to pick good orthogonal colors on
a light bg.

------
haar
I use tir_black for Vim (Terminal Vim via iTerm2 with xTerm reported); I find
it softer on my eyes that a lot of other colour schemes I've tried.

------
irahul
White on black - ir_black

    
    
        http://blog.toddwerth.com/entries/8
    

Tried a number of themes - this works best for me.

------
DanBC
I prefer off-white text on a dark grey back. Sometimes a quite bright yellow /
orange on grey; other times an HN background on dark grey.

------
mrspeaker
I'm interested to see the results - a bunch of (dare I say "new") editors seem
to pick a light background by default.

~~~
paulrouget
I will publish them on my blog (<http://paulrouget.com>)

------
andys627
I remember eading th ebest was white that matches ambient light (i.e. if its
dark in the room, turn the light on)

------
nvk
I like preserving my sight as much as possible, so dark (not black) with light
(not white) pastel colors.

~~~
swah
Which one on the background?

------
colinm
Green on orange, cos that's how I roll.

~~~
nicklovescode
Come on, make that small step and go Christmas colors

------
robot
green on black

~~~
ars
For me as well, although it's not just green, it's color coded so the colors
vary.

------
DanielStraight
DEDEDE on 404040

I find the perfect colors largely depend on monitor and environment though.

------
viraptor
vim: inkpot (with the ink(y) background option turned on) - that counts as a
dark background

------
Rayne
I'm a big fan of tomorrow-night

~~~
envex
I second that.

------
veyron
I'm confused: If you give users an option to choose black on white or white on
black, why would the default option be relevant? In this particular context, I
would imagine users are sufficiently competent to be able to judge the
platform after customizing the colors ...

------
mkup
White on dark blue (Far Manager builtin editor with Colorer plugin)

------
steele
syntax highlighting against black is nearly impossible when achieving and
exceeding the ballmer peak; too blurry for me.

------
sarahsh
I prefer dark, less light hitting my eyes.

------
miles_matthias
White and other bright colors on black.

------
holychiz
light on dark theme: tango, +f.lux, +stylish on chrome for replacing popular
websites w/ dark themes.

------
therealarmen
pink on purple

------
bdz
white on blue

------
karlzt
my whole system is dark themed.

------
krupan
emacs: color-theme-dark-blue2

------
_corbett
black on white, +flux.app

------
hackermom
Black (and other colors) on light gray.

~~~
edabobojr
Black on light gray. I've notices as I've gotten older that a white background
just gives me headaches.

