Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Your code editor, black on white or white on black? (docs.google.com)
103 points by tbassetto on Dec 20, 2011 | hide | past | web | favorite | 116 comments

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.

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 ;-)

> In my experience dark backgrounds with light text are more tiring on the eyes in long coding sessions.

I completely disagree; my eyes tire looking at a light screen much more quickly. Sometimes I'll invert the colors late at night just to make things easier to read.

(Come to think of it, thanks for reminding me that I need to figure out how to get xcalib working with my external monitor, not just the laptop screen...)

> 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.

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.

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

Thanks - but it is pretty darn low already.

I understand conceptually what Ethan wanted to accomplish with Solarized, but in practice I find I need to make an effort to read it.

Well, light or dark? I go Solarized Light.

I am using both depending on the light around me. A little helper function bound to f9 makes that really convenient.

Solarized Dark here

Light, which I voted for.

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

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.

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?

Yes, me too. I use the dark theme in Visual Studio and Vim, but have the light theme running in SQL Enterprise Manager (which I use rarely).

I like both themes, but have been sticking to the dark one because of display issues on my laptop.

I use Josh Kill's dark "kolor" theme in Espresso and love it.

Preview: http://joshkill.com/storage/kolor-preview.png Site: http://joshkill.com/

Squarespace also made this an option in their new CSS editor, which is awesome.

Wow, this is nice! I have already made the switch on all of my primary editors. Thanks.

Getting a "502 Bad Gateway The server returned an invalid or incomplete response." for a couple of hours now.

Hope it is fixed soon, want to try it out.

Solarized is the ideal colorscheme. I use light in the morning, and dark in the evening

Yup, Solarized Light for me.

This is great! Thank you for sharing. I appreciate all of the IDE links.

Love the fact I can switch Solarized light/dark in MacVim easily.

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.

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

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.

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

I tried it on Ubuntu and while it worked, it caused a lot of issue,it would cause the whole UI to go nuts, when i would close the screen (laptop) sometimes it would fuck up everything when i would re-open it, and also going 100% CPU randomly, making the computer useless.

At first i thought it was just Ubuntu not liking my graphic card, but as soon as i removed it everything went back to nomral.

f.lux is also great for short and dark winter days. I keep my day temperature around 4,400K and my night temperature around 3,400K in the winter (and substantially warmer during the summer).

Agreed-- not-quite-white on not-quite-black is much less fatiguing for me than pure white on pure black. The slightly lower contrast is quite pleasing, but still allows for good contrast with syntax highlighting. (I use a variation on the Twilight scheme in Textmate, Eclipse, and Xcode)


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:


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

Customized Wombat, yep.

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

This is what I use for terminal vim/gvim. Haven't found anything better as of yet.

I still use ir_black_plus. Looks great under OSX; much like wombat. For some reason I could never get wombat to work with my vim setup..


hmm why the downvotes?

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!

> 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...

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


I'd be interested to see figures for modern monitors.

That would be true for Amoled screens, but for now they're only used in mobile phones.

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.

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.

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

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

I was thinking about this survey, I think as is, it tells you who, of those willing and able to take the survey, care enough to tell you about their editor colors.

I am a green-on-black kind of guy, having to do with my VT terminal nostalgia, and I care enough to tell you that. But, I would be surprised if the color-caring folk are a representative sample of all color-preference folk.

Xcode midnight theme, dark background.


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

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.

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

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

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.

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'.

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/

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

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.

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.

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

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.

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 :)

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.

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).

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


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

Is there a port for IntelliJ IDEA?

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.

thumbs up! using same seutp.

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

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


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


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.

Please make the results available too.

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.

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.

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…

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.

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.

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

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

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.

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...

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


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.

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.

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.

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.

I settled with this:


with some customizations.

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.

White on black - ir_black

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

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

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

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

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

Which one on the background?

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

Come on, make that small step and go Christmas colors

green on black

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

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

I'm a big fan of tomorrow-night

I second that.

DEDEDE on 404040

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

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 ...

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

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

I prefer dark, less light hitting my eyes.

White and other bright colors on black.

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

pink on purple

white on blue

my whole system is dark themed.

emacs: color-theme-dark-blue2

black on white, +flux.app

Black (and other colors) on light gray.

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

Applications are open for YC Winter 2020

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact