Best Color Scheme For Coding, Easiest On the Eyes?
Marzubus writes "I tend to do a lot of code editing in vim and sometimes get the 'burning eyes' or headaches. I have been trying to find a background / foreground combination for my terminal sessions which is easiest on the eyes but cannot seem to find any real data on this subject. Does anyone know of a study / data on this topic?"
I doubt that the colors will make half as much difference as the quality of your monitor, unless you've been using chartreuse on magenta or something. Not that I know a great deal about the technical details, but I have observed that many cheaper CRTs or LCDs seem to make my eyes hurt sooner than a more expensive one. Apple's monitors are excellent for this, BTW, but they do price them terribly high. These days I'd expect you can get something equivalent for less, though it won't be a $129 model. Also, in 2004 the same question was discussed at length here, probably at least some of that is still relevant.
Caveat Utilitor
I've looked into this topic a few times in the past...
Last time, I found a page that shows samples of hundreds of VIM color schemes:
http://www.cs.cmu.edu/~maverick/VimColorSchemeTest/index-pl.html
I don't use VIM (I use JOE), but the color schemes are easy to convert manually
Whats nice is that you can scan through a _lot_ of schemes very quickly, and easily pick out the ones that work very well.
Zenburn is a low-contrast colour scheme for low-light conditions. It is popular color scheme among programmers because it is very easy on the eyes.
Legend says it was used by the ancients when they developed teh internets and our realm.
* http://www.codinghorror.com/blog/archives/000682.html
* http://slinky.imukuppi.org/zenburn/
* http://www.vim.org/scripts/script.php?script_id=415
* http://slinky.imukuppi.org/2006/10/31/just-some-alien-fruit-salad-to-keep-you-i n-the-zone/
* http://termos.vemod.net/zenburn-for-konsole
It is I, 1100101, and this was asked three months ago with a good discussion. I guess slashdot operates in quarterly cycles. :)
Here is the previous discussion: http://science.slashdot.org/article.pl?sid=08/04/08/2213222
As to not karma-whore, here was my response as a doc...
http://slashdot.org/comments.pl?sid=515908&cid=23008272
I use green text on a black background, and it seems to help. A lot of it has to do with the quality and type of your monitor.
Anybody want my mod points?
A black foreground on a black background has always given me the least eye pain.
Pink text on green background.
This combination is so vibrant that it burns the code into your brain, allowing you to better visualize your program.
That, or give you a seizure.
This comes up all the time.
Personally I find the above best. I can cope with green or yellow text, but find white best, followed by cyan. This whole idea of the modern WYSIWYG desktop trying to emulate paper and thus having a white background is just stupid. Paper is a reflective medium. Screens emit and therefore looking at a white screen is going to give you the office worker's equivalent of snow blindness. Print preview should have a white background, and it should be an easy thing to switch it on for typing up a text document (for true WYSIWYG) but we really shouldn't be using it all day.
These posts express my own personal views, not those of my employer
We seem to get this article every few months, and there's never any scientific data to look at.
So, uh, enjoy your 400 posts of anecdotal evidence and personal opinion. Personally I reccomend pastel text on an ash grey background.
I'm with the parent. Black background. I use Lime Green, with Lime Green for the cursor, and Yellow for selection. It's high contrast, easy on the eyes, and it makes it look like you're programming The Matrix. =)
UTF-8: There and Back Again
This combination is the most relaxing for the eye. Also, illuminate the area around and behind the monitor.
Why ? Depth-of-focus. Brightness will make the pupils contract, which increases the depth of focus and decreases the amount of regulating that the eye needs to do.
Maybe you need to have your vision checked, too. Having a quarter of a diopter too much or too little is hardly noticable, but wil give you headaches in the long run.
One thing you have to remember is that you're not just seeing your screen, but also the things around it (in case you don't own a 30" TFT...). So, personally I have found whatever theme resembles the colors and brightness levels of the area of my desktop (the table, the wall behind it, the amount of light etc.) works best for me, i.e. causes the least strain on my eyes. Which, as a consequence, also means that I'll at least adjust the brightness of my screen with changing daylight hours. /., go for a darkish theme matching the missing daylight in your basement.
So, this being
The default vi colors on a fresh Gentoo install are absolutely beautiful
Could you check what they are and post them please? I'd like to try it but don't have that kind of time.
A fir bit of informal research has been done by chessplayers on this subject. After decades of experimenting, the choice of chessboard color seems to have settled on dark green on yellow or beige.
This makes sense when one considers that the eye sees colors best in the middle of the spectrum where yellow and green are; and sees worst at the ends where they fade into infrared and ultraviolet.
The few scientific studies I've found on readability indicate that there is no color scheme that significantly enhances readability -- I would think readability would only be part of the issue regarding the eye strain problem.
So, what about making your own bias light for your monitor? That will _definitely_ reduce eye strain.
I love Zenburn. I use it on all my machines now and at work.
But there is one thing you should do in your .vimrc prior to setting :colorscheme zenburn, and that is forcing the use of 256 colors:
Also I found that the search highlighting wasn't visible enough for my taste, so I tuned it. After :colorscheme zenburn I have:
And if you like to have a little more contrast, then insert the following before your :colorscheme zenburn:
which together makes for this:
Ages ago when I was using Borland IDEs I got used to the blue background with white text and I still prefer that over anything else.
To be precise Borland default color scheme was yellow on blue, which I couldn't stand, but with white text it's actually pretty good.
-- Reality checks don't bounce.
Old terminal screens were green because of the technology. Not because they were concerned about eye strain back in the 60s.
The old color schemes were well researched. When people were paying $100,000's on their mainframes, they wanted monitors that worked well for their operators. The productivity of the mainframe depended on it. This resulted in many of the old monitors being amber on black or green on black rather than the easier to build white on black monitors.
For color monitors, the white on blue and yellow on blue schemes are the best. Black on white isn't bad; it has the virtue of being high contrast. White on black is still one of the worst color schemes. I never got a good explanation of why black on white is good (think original Apple Mac), vs. white on black is bad (original IBM CGA).
Resolution and refresh rate are also important. Generally, rendering the same number of characters at a higher resolution is easier on the eyes. Thus, the original IBM PC Hercules monochrome card is a much nicer screen to program on than the original IBM PC CGA video card. It wasn't until VGA that the color resolution on the IBM PC was as good as the monochrome resolution, and people started switching in a broad way to color only displays.
Finally, look at purchasing a pair of glasses. Even if you have "borderline" vision, like I do, they may ease eye fatigue. At first, they will probably bother you, until you get used to using them.
I coded for over 10 years using amber DEC VT terminals, and my prescription on my glasses only changed marginally. And much of that coding was done in 132-column mode.
The important thing to do is to periodically give your eyes a break. Take the time to stop looking at the screen and focus on something distant across the room, office, or out the window. Staring at anything long enough will give you a headache....
My mom always said, "Jim, you're 1 in a million." Given the current population, there are 7000 of me. God help us all!
My eyes never burn no matter how many 16- and 24-hour sessions.
Matching brightness to ambient lighting is much more important than color scheme (unless you are going nuts with red on blue or something). I have been working as a coder for 12+ years now with a lot of 14 hour+ days...
I never had much problem with CRTs. I prefer white backgrounds (standard VIM with syntax highlighting) with the brightness toned down to near paper levels for easy viewing.
Most of the bigger LCDs I have tried lack the range of brightness control as they fight for supremacy in the specification wars. I have purchased LCDs of all three types (VA/TN/IPS) and in sizes ranging from 17" to 30".
Eye comfort has correlated most strongly with how low you can modulate the brightness. On most big panels this modulation is quite poor when they aim for 400-500 cd/m2 which is insanely bright and hurt my eyes instantly regardless of color scheme (bright on dark or dark on bright both hurt). Even when these beasts are at ZERO brightness they are still often over 200cd/m2 which is completely nuts in a normal home lighting. You next have to resort to using the blocking characteristic of the LCD panel to lower it further which results in contrast going down the drain. Or set up more lighting which seems like a waste in terms of energy if nothing else.
After all my purchases I have ended up with lower brightness cheap TN panels. These modulate to the dim end very nicely and tend to have fairly clear screen anti-glare coatings for nice clean text with a paper in light level brightness achievable.
I recommend something like the Benq G2400W with it's nice 250cd/m2 max brightness (and therefore very good lower light performance).
YMMV.
----------------------------------- My Other Sig Is Hilarious -----------------------------------
their idea of text smoothing is to apply Gaussian blur to it and smudge it a bit. They do not use advanced manipulation like clear type does
LOL!! Incorrect. The Mac uses subpixel anti-aliasing just as ClearType does, but it uses a slightly different hinting algorithm. Of the two, the Apple way is probably better subjectively for most people. More info here: Font smoothing, anti-aliasing, and sub-pixel rendering and here: Texts Rasterization Exposures
When I was a lad, there was a big push in the schools to replace old blackboards with dark green chalkboards. This was supposed to be easier on the eyes.
I use this idea in my Emacs windows, and set a background of DarkSlateGray (47,79,79 or #2f4f4f in HTML). With Emacs syntax highlighting I find it best to leave the default foreground white.
I also recommend the "Lucida Typewriter" font, bold, at a decently large size. Many people use fonts that are just too damn small and then wonder why they suffer eyestrain.
I also wonder if larger monitors are contributing to eyestrain - more eye movement is needed. I have a 15" LCD, equivalent in size to a 17" CRT which was considered something of a luxury when I first got one. Many people would complain about it being too small - but I notice that my monitor is almost exactly the same size as my open copy of a random book, O'Reilly's "Web Services Essentials". I think there are good reasons why books evolved to the page size that they did.
Tom Swiss | the infamous tms | my blog
You cannot wash away blood with blood
This comes up on /. every so often, and I'm summarizing here the advice from a few people who (to me at least) sounded knowledgeable about the topic last time it came up.
Based on this advice I've switched to blue on light beige (#0000C0 on #FFFFC0). It has a strong contrast in two channels, no change in the third, and suits my office (reasonably bright, but lit with non-natural light). So far, this is working well for me.
A little slash-trivia here:
You can also notice the refresh of a CRT if you chew on something hard, like peanuts, while staring at the screen. The crushing action of your teeth vibrates your head just enough to interface with the screen's refresh rate, causing the picture to "bounce" and shear in your field of view.
Plus, the chicks will just assume...
I can't stress the "ClearType" sub-pixel rendering enough. At work i switched from a CRT to an LCD and got eyestrain almost immediately afterwords. Enabling that feature caused the problem to go away just as fast.
Most people are right handed but some are left handed. Most people prefer light background and others like me prefer dark. You may be the same. Unfortunately most of the web is pretty much hardcoded to have blinding white backgrounds so after years of slogging through style-sheets and app-defaults I gave up and used the sledghammer approach. I now run everything in a VNC server and use a hacked vncviewer to render the world in reverse video. I'm happy and the patch is here http://www.vnc.cz/pipermail/vnc-list/2006-January/053794.html. I'm thinking of moving to Xvfb with a hacked x11vnc as that might give a more up to date X-server and will work with Windows viewers.
Also works with low and pedal tones on a brass (low brass pref) instrument. Makes the digits on a LED digital clock waver and bounce slowly in addition to seeing screen refresh.
The color I have found that works best is orange on green. This color pair has to be tuned so that the level of green primary in the orange is equal to the level of green in the background. This ensures that the boundary edge between foreground and background colors is limited to a single color. With the contrast being in a single color, it can remain in sharp focus regardless of the color error of the lens in the eyes or corrective lenses many people use. While red on black would maintain the same sharpness, having an added green base color increases the illumination level, causing pupils to contract to a smaller opening, increasing depth of field and improving focus and visual sharpness. Adding some blue to the base color (approximately pink on dark cyan) can also work. Just be sure that the foreground color has as much green and blue as the background color.
now we need to go OSS in diesel cars
I'd be more worried about the fact that "things" are judging you...
Support a true independent artist - Leila Lopez
At least in Windows, you can turn off Cleartype. OSX on a CRT, on the other hand, is a big blurry mess. It's still a blurry mess on a LCD too, but that's just my opinion.
but on the other hand Apple's font rendering looks worse than on Linux or even Java's on Mac OS X, and sadly Microsoft is out of their league.
And Mac users that fervently deny there is a problem at all and will gladly bend over and take what ever Apple is giving them, and this will ensure Apple's font rendering stays like this.
Sad, because the platform is nice otherwise.
As the island of our knowledge grows, so does the shore of our ignorance.