Slashdot Mirror


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?"

15 of 763 comments (clear)

  1. Probably not colors by clang_jangle · · Score: 5, Informative

    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
    1. Re:Probably not colors by nikomen · · Score: 5, Informative

      I concur. A while ago I purchased a couple cheap LCDs. I noticed that the LCDs at my university were easier on my eyes than my home LCDs. I sold my LCDs to my parents who I knew wouldn't be on the computer for any long lengths of time. I bought a couple HP LCDs that were recommended to me and they make a world of difference. This isn't an ad for HP, just simply stating that cheaper LCDs probably cause some kind of eye strain compared to a little more pricey (yet not horribly expensive) LCDs.

    2. Re:Probably not colors by Bandman · · Score: 4, Informative

      With CRTs, refresh rate was a big deal, so that might have been part of it.

      If your monitor's refresh rate was equal to the ambiant lighting's refresh rate, you could almost guarantee a headache

    3. Re:Probably not colors by hansamurai · · Score: 5, Informative

      Great point, I have two LCDs at home, one is a six year old Envision monitor and then other is a three year old Samsung. The Samsung monitor looks worlds better and is much easier to look at for extended periods of time. It's one of those things I can't lay my finger on but it's definitely there.

    4. Re:Probably not colors by SQLGuru · · Score: 4, Informative

      Also, environmental factors. For example, I've been in various cubes over the years and the ones where there was a light fixture visible from my chair as I looked at my monitor caused fatigue faster than when the fixture was not visible (this includes when the fixture was behind me....basically visible in any direction from a sitting position at my desk). Also, for a while, they allowed us to dim the fixtures (turn off/remove one bulb) which helped too (not completely dark, but more cavelike).

      Other things you can do is to make sure the brightness and contrast are appropriate. Most people keep them too high (myself included).

      And of course, frequent "look away" breaks. I had an old NEC 21" CRT (heavy beast) that actually had a built in timer that you could set that would remind / force you to look away (the screen would go black except for the message). Easy enough to implement in software if you are so inclined.

      There's some good articles here: http://www.sangrea.net/ohs_dbase/colour-color.htm
      They are mostly focused on designing web pages, but the information is just as relevant for any computer image that someone will be starting at for any length of time.

      And of course, a different Slashdot question on the same subject: http://ask.slashdot.org/article.pl?sid=01/09/14/1516207&mode=thread&tid=99

      Layne

    5. Re:Probably not colors by maexio · · Score: 4, Informative

      I think it was determined that Green On Black was the ideal method back in the day (When color monitors / technology was too $$$ / unavailable)

      Or it could have something to do with our eye's ability to see various wavelengths of color. For instance, the same 'intensity' green laser is 8x more visible than a red laser. This wiki link:

      http://en.wikipedia.org/wiki/Visible_light

      shows the range of colours in wavelength form, while this one :

      http://en.wikipedia.org/wiki/Color_vision

      shows the nm of light that each type of receptor can see. If you see, the Green wavelength appears to be near the middle, so although ianad (I Am Not A Doctor), the green theory seems to hold up.

      Also, i heard / read it somewhere a long time ago (ie, why all the crummy dumb terms seem to be green on black)

    6. Re:Probably not colors by spec8472 · · Score: 5, Informative

      It's quite possible that the old LCD display is a 6 bit (256k colours) panel, which to display colours which didn't fit exactly onto that colour space, flickers between two on either 'side'. It's called 'temporal dithering'.

      http://en.wikipedia.org/wiki/Dither#Applications

      Theoretically you shouldn't be able to notice this, but it's the same with low refresh rates on CRTs - some people can notice it directly, others indirectly through eyestrain.

    7. Re:Probably not colors by penguin_dance · · Score: 4, Informative

      If you wear corrective lenses, make sure you get your eyes checked regularly for any changes. Also, I found it worth the price to get a pair of glasses suited for the distance I sit from the computer.

      You should also be taking breaks at least once an hour. And keep in mind that people blink less than normal when on the computer so make sure you are blinking. I find that a good quality, moisturizing eye drop can help.

      Also check the brightness and contrast settings on your monitor. You may need to dim things down if you work in an area that already has bright lighting.

      The Mayo clinic also has a good list of tips.

      --
      If you've never been modded as "flamebait" or "troll," you've never tried to argue a minority viewpoint here!
  2. Color Scheme Sampler by slifox · · Score: 5, Informative

    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.

    1. Re:Color Scheme Sampler by Hognoxious · · Score: 4, Informative

      you can scan through a _lot_ of schemes very quickly, and easily pick out the ones that look pretty

      Fixed that for you.

      For future reference, aesthetics (particularly in the short term) != usability.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  3. Zenburn by Anonymous Coward · · Score: 5, Informative

    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

  4. Bias lighting? by Guanine · · Score: 4, Informative

    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.

  5. Zenburn by DarkDust · · Score: 4, Informative

    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:

    :set t_Co=256

    Also I found that the search highlighting wasn't visible enough for my taste, so I tuned it. After :colorscheme zenburn I have:

    :hi search ctermbg=223 ctermfg=238
    :hi incsearch ctermbg=216 ctermfg=242

    And if you like to have a little more contrast, then insert the following before your :colorscheme zenburn:

    :let g:zenburn_high_Contrast = 1

    which together makes for this:

    :set t_Co=256
    :let g:zenburn_high_Contrast = 1
    :colorscheme zenburn
    :hi search ctermbg=223 ctermfg=238
    :hi incsearch ctermbg=216 ctermfg=242

  6. Re:Yelow on Blue, look at the old monitor designs by Ihlosi · · Score: 5, Informative
    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).

    You'll get it now: Depth of focus. Bright-on-dark results in a darker screen overall than dark-on-bright. This means that your pupils will open wider (to let more light in), which results in a smaller depth of focus (optics 101, ask anyone whose hobby is photography). And this, in turn, means that your eye has to re-focus more often.

  7. Three rules by barracg8 · · Score: 5, Informative

    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.

    1. Use a strongly contrasting color scheme - this is obvious, black on white is easier to read than orange on red.
    2. Match the background color to the environment - staring at a bright monitor in a dark room is like staring straight at a light bulb - and the reverse can be true too (you get a halo around the monitor burning into your retina). Green on black is probably a brilliant color scheme if you do all your coding in a basement only lit by the blinkenlights of a router, but in a well lit office may not be as good for your eyes.
    3. Limit color edges. Okay, this is where I'm going to paraphrase other people really badly, but here goes. Your eye has separate RGB color cones, and effectively has to match a set of separate red, green, and blue images together. For some people, you can start to see optical effects when there is a strong contract change in different channels - your eye doesn't line up the images correctly, causing a blurry shadow around objects. This is not necessarily visually all the pronounced, but causes eye strain.

    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.