I recently switched to a color theme with a dark background in Visual Studio 2005. The choice was almost purely logical: there’s more room for color variations. A light background will have dark text and a dark background will have light text, and the differences between light colors is more noticeable than the difference between dark colors (eg. compare #5f0000 and #00005f to #ff0000 and #0000ff). Therefore, the different elements of the syntax will have more variety and be easier to understand.
That’s my theory at least. We’ll see how it pays off.
I haven’t settled on a particular theme yet. Scott Hanselman has given some suggestions. Jeff Atwood has written about it, of course. So far I’m using Dark Visual Studio from Brad Wilson. I prefer its blues over some other themes’ browns.
Initially, I had a hard time seeing and understanding my code. I was looking for green comments, but they were purple. But I realized that the problem wasn’t the colors, it was the code itself. Even though I had written it the day before, and was looking at it just minutes ago, it become gibberish with a new theme.
The problem is that, when you’re writing code, you get used to seeing the shapes and structures of the text, more than the code itself. That method with a couple long green lines at the top and a too-deep if-nest at the bottom? Yeah I know what that does. But when the green code is purple and the blue statements are orange, it’s brand new.
I immediately refactored a large portion of the application.
It’s good to be familiar with your IDE, including the syntax highlighter, but I think it’s also good to step out of your element every now-and-then. If you’re working with the same code and the same colors for weeks, you can lose sight of the deficiencies. Change helps bring them back.
There’s one thing left though. This was just for VS2005. I also use VS2003 at work, and I sometimes use VS2008. Then there’s Notepad++, for anything non-.Net, which has dozens of themes itself. I really with there were a standard settings format that could be used by all major editors. Better yet would be if they all use the exact same file, so a single file in your user directory controls the highlighting in all your editors.