Color Schemes in SQL 2005 Management Studio

As many of you know, I spend time every now and then coming up with new color schemes for Visual Studio 2005. It's fun, and having a good color scheme can make all the difference in the world to your eyes when spending long times in front of your screen writing code.

I use dark backgrounds, so it was always painful to switch to SQL Server 2005 Management Studio to write SQL code, because I had not configured a custom color scheme there. I also didn't want to have to spend more time doing so, particularly since Management Studio has no Import/Export Settings wizard.

Enter VSColorsToSql

This is a simple utility I wrote last night that will port your current VS2005 Fonts And Colors Settings (just for the code editor, mind you) to Management Studio. It's nothing fancy, so all it does is copy some registry settings around. Here's my current scheme:

SqlColors

It does make some assumptions and and a few changes: Turns out the SQL and XML editors in VS use different settings than the corresponding ones in Management Studio! Hopefully, the mappings I selected will give you something usable as well.

Just to be on the safe side, you can export your existing Management Studio settings by backing up this registry key:

HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\90\
Tools\Shell\FontAndColors\{A27B4E24-A735-4D1D-B8E7-9716E1E3D8E0}

You can download the code from here.

kick it on DotNetKicks.com

Comments (18)

Damien GuardOctober 31st, 2007 at 2:41 pm

Cool, look forward to trying this back in the office tomorrow.
[)amien

Murat TopçuDecember 10th, 2007 at 7:15 am

Thanx ;)

Pradeep K.July 15th, 2009 at 3:20 pm

Took me some time to convert this to VB .Net, and figure out a way to make it work between VS 2008 and SSMS 2008… But it was well worth it! Many thanks.

ChrisJuly 31st, 2009 at 7:27 pm

Pradeep, can you share?

Simon MorleyAugust 13th, 2009 at 12:34 pm

Just change the registry values to the following for Visual Studio 2008 -> SSMS 2008

SRC_KEY = @”Software\Microsoft\VisualStudio\9.0\FontAndColors\{A27B4E24-A735-4D1D-B8E7-9716E1E3D8E0}”;

DST_KEY = @”Software\Microsoft\Microsoft SQL Server\100\Tools\Shell\FontAndColors\{A27B4E24-A735-4D1D-B8E7-9716E1E3D8E0}”;

Thanks to Tomas for this handy tool!

[...] after a little digging on google I managed to find this post by Tomas Restrepo where he had actually written a tool to import the registry settings from [...]

DragosNovember 5th, 2009 at 11:40 am

Thanks a lot man!

kostyaMarch 4th, 2010 at 10:01 am

Great job!!!
You save my eyes ;-)

StuMarch 4th, 2010 at 12:15 pm

Hey Tomas

I’ve been using one of your dark themes (Ragnarok Grey) with VS2008 for a while and I love it. I’m looking to use this in SSMS2008 too but I’m struggling to find by reg key to back it up. You might say that if I don’t even know where to find this I really shouldn’t be messing about with it, but I’m dying to bring SSMS to the dark side!

Tomas RestrepoMarch 4th, 2010 at 11:32 pm

@Stu: Did you see the comment left by Simon above about which keys to change in the app to do the migration for you?

StuMarch 9th, 2010 at 12:27 pm

@Tomas – I saw that, sorry my question wasn’t clear. The part I’m having difficulty with is backing up my existing registry key in case of catastrophe! Should I modify the code to do this before the settings are transferred over or is there a way of doing this through Windows explorer?

StuMarch 9th, 2010 at 12:33 pm

@Tomas

Sorry – I’ve done some googling as I should have in the first place and found some regedit docs… I’ll figure it out. Thanks a lot!

[...] http://winterdom.com/2007/10/colorschemesinsql2005managementstudio This is a simple utility that will port your current VS2005/2008 Fonts And Colors Settings (just [...]

Jeff SMay 7th, 2010 at 8:07 pm

This worked fine with Visual Studio 2010 as well. Just change Simon’s suggestion from above:

Just change the registry values to the following for Visual Studio 2010 -> SSMS 2008

SRC_KEY = @”Software\Microsoft\VisualStudio\10.0\FontAndColors\{A27B4E24-A735-4D1D-B8E7-9716E1E3D8E0}”;

DST_KEY = @”Software\Microsoft\Microsoft SQL Server\100\Tools\Shell\FontAndColors\{A27B4E24-A735-4D1D-B8E7-9716E1E3D8E0}”;

RodolfoMay 18th, 2010 at 9:57 pm

What happens if im using windows 7 64bits (sql server 2005, visual studio 2008)
do the keys referenced on the program change?

thanks

Tomas RestrepoMay 19th, 2010 at 12:19 am

@Rodolfo: They shouldn’t, I think, but not sure; I don’t usually run my main dev environment on x64. However, both VS and SQL management tools are 32-bit, so you’d likely be fine if you force the tool to run as a 32-bit process as well.

Chris GroveJuly 29th, 2010 at 7:59 am

Top utility, thanks.

ShardulAugust 7th, 2010 at 6:30 pm

This worked like a charm !
Just the kind of stuff that makes me more productive while not being bothered by the unnecessary eye-strain.
By the way, with a bit of tweak, I got my SSMS2008 to wear the Ragnarök Grey theme by borrowing it from VS2010. Pretty neat.

Leave a comment

Your comment