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

43 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 intx13 · · Score: 4, Funny

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

      Maybe you should stop programming in raves! Turn off the strobe lights - my light bulbs don't refresh!

    6. Re:Probably not colors by funfail · · Score: 4, Funny

      Seems you never worked in a fluorescent lit cubicle.

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

    8. Re:Probably not colors by RobertM1968 · · Score: 4, Insightful

      Actually, colors do make a difference... though I dont know enough to know which ones are better. Also, true flicker free lights help as well - even though LCDs are almost flicker free.

      I would guess the optimal colors would be determined by the color temp setting used on the LCDs. Personally, I prefer warmer lighting (warm white flicker free flourescents or warm white halogens), though the color temps on my monitors are pretty high.

      Possibly more important is light placing and intensity. Studies (on /. a long time ago, at the link above and elsewhere here; and on the web of course) shows that less light is easier on the eyes for coders and data entry people. It (if memory serves) helps reduce eye strain and distraction. Inotherwords, use enough light to see your workspace, illuminate your keyboard - and not much else. Upward facing lights (ie: "torch" lights, wall sconces, etc) help with this because they bring up the ambient light in the room without the eye-strain issues direct lighting cause for those who code or do data entry. To that, one would add task lighting appropriate to the job they are doing (like a desk lamp over their reading area where they browse their programming guide or stack of papers they are entering into the computer).

      Cheaper CRTs (or CRTs in general) have a flicker to them which can make one's eyes hurt. Cheaper LCDs sometimes have slower refresh and response rates that can cause a similar effect - contrary to some people's beliefs that an LCD is an LCD is an LCD. Also, if you compare a high quality LCD to a cheapo one, you can often notice the difference in quality - especially on text rendering... text is often "smoother" looking on the better one - which also helps reduce eye strain.

      Generally, for an LCD, one that (accurately) claims it is great for gaming - and has good pixel representation - is an ideal choice. It means it should have a very low response time, and good clarity and contrast. Skip CRTs... they may make pretty images - but as resolutions climb, LCDs beat them in text display.

      Keep in mind, much "eye" strain is due to data your mind is filling in and your eyes are trying to follow (or external visual distractions your mind or eyes are trying to absorb).

    9. Re:Probably not colors by tenco · · Score: 5, Funny

      Edison, is that you?

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

    11. Re:Probably not colors by DrLang21 · · Score: 4, Funny

      Apparently you only use DC powered lights.

      --
      I see the glass as full with a FoS of 2.
    12. Re:Probably not colors by Bandman · · Score: 4, Interesting

      Back when I played FPS's, I would be able to see flickr on TV. People thought I was crazy, too.

    13. Re:Probably not colors by Bandman · · Score: 4, Funny

      weird. I meant flicker. Damn you flickr for corrupting my spelling!

    14. Re:Probably not colors by mysticgoat · · Score: 5, Insightful

      Not yet mentioned but often a problem are reflections.

      Turn the monitor off and look at the dark screen as if it were a mirror. If you can see anything recognizable, or there are definite fuzzy brighter areas, then reflection might be the culprit.

    15. 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!
    16. Re:Probably not colors by AKAImBatman · · Score: 4, Insightful

      A secondary factor may be the settings of the different computers you have the LCDs attached to - if (God forbid) you're using Windows systems, check that both have "Cleartype" enabled and that it has been tweaked for that particular monitor's arrangement of RGB on the screen. It really does make a difference.

      You know what works even better? Make the font bigger. The larger the glyphs are on the screen, the less your focusing system has to strain to clearly read the character.

    17. Re:Probably not colors by Mick+Malkemus · · Score: 5, Insightful

      You SOLD to your own parents? I can't imagine that. Has America become so materialistic that we sell things to our own parents now?

    18. Re:Probably not colors by radimvice · · Score: 4, Funny

      but back in the pre-GUI days, white on blue was pretty soothing

      ...ahh, I fondly remember those days, when seeing a soothing white-on-blue screen appear didn't yet cause me to instinctively start cursing and reach for the power switch...

    19. Re:Probably not colors by D+Ninja · · Score: 5, Funny

      I sell my old tech to my parents all the time. I like to teach them the value of money.

    20. Re:Probably not colors by arth1 · · Score: 4, Interesting

      Yes. Here in the US, it's even common for people to sell presents they've been given.
      I gave someone an old computer because she needed one, and then she turned around and sold it. And then had the audacity to tell me with a smile how much she got.

      Back in the old world, this would be considered beyond rude, bordering on fraud, but "rude" is defined very differently over here. Greed isn't considered a bad word here where money always comes first, and if you give someone something instead of making a buck on it, you're considered a fool. So selling things to your parents would be par for course.

    21. Re:Probably not colors by Glog · · Score: 4, Interesting

      Alright, we have a lot people vouching for the superiority of "pricey" LCD screens - I doubt it's the price alone that eases the strain on the eyes. The real questions is - what is it about "pricier" models that makes them easier on the eyes - perhaps if we are able to isolate the one or two or five features that improve the user's experience (as far as eye-strain) we'd be better off when comparison shopping for LCD's. Any suggestions? I'd be interested since I am also in the market for a new monitor.

  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 Anonymous Coward · · Score: 5, Interesting

      I read a study once that said that yellow text on a blue background was easiest on the eyes, and I've been using this for text-only frames in PowerPoints ever since. I used to get the occasional complaint that slides were unreadable, but I haven't since. I've noticed also that when looking at these slides for a while I don't get quite as much of the after-image effect as I do with white-on-black. Give it a try.

    2. 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. Re:Color Scheme Sampler by poot_rootbeer · · Score: 4, Interesting

      Agreed. When working for any real length of time, I always go Green on Black (since long before "The Matrix" came out).

      Old-school and much easier on the eyes.

      If it works for you, great. But keep in mind, that color combination arose out of economic concerns, not usability ones. Using a green phosphor layer was the cheapest way to build a functional CRT display in the first few generations of computing, and probably still would be if economies of scale hadn't made RGB tricolor just as affordable.

  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. Black on Black by jhouserizer · · Score: 5, Funny

    A black foreground on a black background has always given me the least eye pain.

  5. Pink on Green by QuantumPion · · Score: 4, Funny

    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.

    1. Re:Pink on Green by syousef · · Score: 4, Funny

      Pink text on green background.

      Let me guess, you taught HTML for dummies courses using Hotdog and Netscape Navigator Gold in the mid to late 90s.

      --
      These posts express my own personal views, not those of my employer
    2. Re:Pink on Green by SQLGuru · · Score: 4, Funny

      Don't forget that he was a huge fan of flashing text to grab attention. And since you wanted people to see your whole page, it was all flashing.

      Layne

  6. Black background, white or cyan text by syousef · · Score: 4, Insightful

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

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

  9. Yelow on Blue, look at the old monitor designs by Cassini2 · · Score: 4, Interesting

    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.

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

    2. Re:Yelow on Blue, look at the old monitor designs by MrEd · · Score: 4, Insightful

      I've done some industrial control room display design, where the client still wants things to be easy for the operators. The consensus among human factors professionals is that a light gray background is best (similar to the slashdot color scheme around this comment box). Why?

      - To match the screen luminance to your surroundings. Monitors showing black backgrounds will more harshly reflect the ambient light, resulting in annoying glare (unless you work in a pitch black room). The lower the ambient light level in your workspace, the darker your gray.

      - To allow the greatest range of text colors with acceptable contrast. For example, try reading yellow on a white background. Using gray gives you the option to transmit a lot of color information while keeping an even contrast. The key, again, is to choose text colors that are not "pure" from the MSPaint palette, but instead are pastel-ized enough to have equivalent contrast on your grey background of choice.

      The combination of these two should result in a fairly even constrast throughout your workspace. The goal is to minimize the light correction your eye has to perform when you look from the screen to your surroundings, and when navigating around through different parts of your code.

      If there are elements of your work (like BUGBUG in code) that you want your color scheme to draw to your attention, a grey background also lets you choose a more saturated, salient color to really punch up the attention-grabbing factor.

      --

      Wah!

    3. Re:Yelow on Blue, look at the old monitor designs by DeadCatX2 · · Score: 4, Insightful

      While quite insightful, I think that would only apply if the monitor was the primary source of ambient light. In a properly lit room, the pupil size should only be very loosely correlated with screen brightness.

      --
      :(){ :|:& };:
  10. Dude. Just blink more. by sudog · · Score: 4, Insightful

    My eyes never burn no matter how many 16- and 24-hour sessions.

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

  12. Peanuts by pragma_x · · Score: 5, Interesting

    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.

    1. Re:Peanuts by Bemopolis · · Score: 4, Interesting

      Another way to see the refresh rate is to hold your index finger horizontally between the screen and your eyes and move it up and down. The refresh will essentially act as a strobe light, and you will see multiple images of your finger. If you get the cadence right and create stationary images, you can even calculate the refresh rate.

      Hey, what can I say — some people are bored nerds who are allergic to peanuts.

      --
      "I guess the moral of the story is, don't paint your airship with rocket fuel." -- Addison Bain
  13. Re:ClearType FTW by LordMyren · · Score: 4, Interesting

    Apple Windows and Linux all have pretty awful sub pixel rendering. Ideally you want a solution that lets you tweak the size of a font infinitely: you should be able to make any word or any letter any size what-so-ever. To my knowledge none of the common sub-pixel rendering systems provide this level of fine grained control.

    The only good sub pixel rendering I've ever seen is well explained on Anti-Grain's Text Rendering page. This page explains how bad most sub-pixel rendering is, and how much better their open source method is.