SentryOne Team Blog (blogs.sentryone.com)

Making SSMS Pretty : My Dark Theme

Updated June 30, 2015 : adjusted a few of the settings.

I've been using a dark theme in SSMS for some time now. For myself, I find it far easier to read light on dark, if you choose the right colors. I modeled our CSS here after the same type of scheme (using a heavily customized version of WP-GeSHi-Highlight). Here is a code sample:

SELECT GETDATE(), N'hello'
  FROM sys.all_columns AS c
  LEFT OUTER JOIN sys.all_objects AS o
  ON c.[object_id] = o.[object_id]
  /* ORDER BY something */
  ORDER BY c.name;
 
EXEC sys.sp_help;

And here is a screenshot of the same code in my local copy of SSMS (it looks lighter in a web page than it does on my screen, I promise):

My SSMS colors

The only real difference, which you may have spotted, is that WP-GeSHi treats ambiguous words like LEFT and RIGHT as if they were built-in functions (which they are), while SSMS treats them as keywords (which they also are).

Doing this the hard way

You can do this manually, of course. Go to Tools / Options / Environment / Fonts and Colors. Highlight text editor and make the background dark and the foreground light:

tools-options

(Mine are RGB(228,228,228) for Item foreground and RGB(50,50,50) for Item background.)

Then go down the list and change the "Item foreground" color for things you want to change, using the Custom… button. Put a snippet of text in a query window that has just about everything – DMVs, functions, keywords, system procedures, comments, highlighted text, string, etc. so you can see the effects after every change.

You'll have to play with it on your own to get the settings you like. Here are some of the other customizations I've made (the update is that I've chosen a slightly different pink for built-in functions, changed SQL stored procedures to green in order to match DMVs and system tables, and changed comments to orange):

  • Comment: RGB(255,175,45)
  • Keyword: RGB(127,176,228)
  • Script Comment: RGB(255,175,45)
  • Script keyword: Cyan RGB(0,255,255)
  • Script string: Yellow RGB(255,255,0)
  • SQL Operator: RGB(199,199,199)
  • SQL Stored Procedure: RGB(128,255,128)
  • SQL String: Yellow RGB(255,255,0)
  • SQL System Function: RGB(220,120,255)
  • SQL System Table: RGB(128,255,128)

I also make size changes for text results and grid results (which require a restart of the application to take effect), and I change grid results from MS Sans Serif to Calibri, and text results from Courier New to Consolas.

Doing this the smart way

A while back, Doug Holland blogged about using the VSSettings file to share themes. (In fact, you may like his color scheme better than mine.)

After the one-time manual process above, it was easy to share the .vssettings file so that I could implement the same color scheme on other machines. First, I need to go to Tools, Import and Export Settings, and choose "Export selected environment settings:

Tools menu in SSMS

ssms-wiz-1

Then I select only the checkbox for All Settings > Options > Environment > Fonts and Colors:

ssms-wiz-2

Note: I also use pretty big fonts in order to minimize the need to zoom anything when presenting. So I've created two separate files, one with LargeFonts in the name, and one with NormalFonts. You can download them here and start from whichever one is more appropriate for you:

To import them, you follow the wizard in almost the same way. Go to the same menu item, but this time choose Import selected environment settings. You will be prompted to save your current settings (a good idea; in the event you can't stand my colors, it will be easy to revert):

ssms-wiz-3

Then you will likely have to move the above files into your Documents \ SQL Server Management Studio \ Settings \ SQL Server Management Studio folder to have them show up here:

ssms-wiz-4

Then the following options should be the only ones selected, and you can choose Finish:

ssms-wiz-5

Note that some settings may not take effect until you re-launch Management Studio (grid and text result settings are still sticky even in the most recent SQL Server 2016 version).

I keep these two files on a thumb drive and in the cloud so that, no matter where I am, it's drop-dead simple to switch sensible coding font sizes to making all of my code and results readable to the nosebleed seats in a large room at a conference. I'm thinking about adding other options to my switch files too, like returning results in a separate tab, including the query output in the results, and other things I tend to do only when demoing / presenting.

Note: this should work for Visual Studio as well, but I haven't tried it (and my specific customizations won't affect most of what you do in VS anyway). Enjoy, and let me know if you have any suggestions or what additional customizations you have made.

New call-to-action

88 replies on “Making SSMS Pretty : My Dark Theme”

88 Comments (Comments are now closed.)
  1. Ah the bliss. Had stared at SQL Server for a year not wanting to dig in and mess with the settings. Thank you for overcoming my procrastination for me.

  2. Aaron, like you I am a big fan of the dark themes. However, I am always frustrated trying to tweak the themes in Visual Studios options editor. So I wrote this: https://github.com/tcartwright/SSMSThemeEditor to make it easier to work on an SSMS theme, and cut it down to the very few options that are actually important to SSMS. Hope you enjoy.

  3. Aaron,

    Thanks a lot for this. I have been looking for a dark theme for my SSMS and now have found it!!!

  4. Have you ever tried to change the backgroud color of the grid? Any insight on how to change it.

    Thanks for the text editor colors, saved me a ton of time!

  5. When I use CTRL-F (Quick Find) in the Text Editor to find a word in my query, it is hard to find the located word as it shows a dark blue background on the black background. Do you know where I can change this color to something that stands out better and is easier to see?

  6. This is the best dark theme ever, thanks so much for sharing! I find it really easy to read which is great on my eyes after a long day at work.

    The only thing I tweaked was to change the Highlight Current Line to RGB(86,86,86).

  7. Worked Great, thanks for the excellent tip. Helps my eyes as well. I am a big dark background fan from UNIX days. – Thanks..

  8. You posted the color for SQL System Function as RGB(220,1120,255), but 1120 isn't valid. What did you intend for this value?

  9. I love the theme, thank you very much. Only thing is that the 'tables' are in a very dark green, which makes them difficult to see. If I want to adjust the colour for tables, which 'display item' should I be adjusting in the Fonts and Colors menu? Thanks

  10. @retracement I believe it's just personal preference. I enjoy a lighter background with darker text, while I know lots of people that like to run dark themes.

    I'm also sort of a vampire, and I like to work in the dark, so glare is never an issue. Sometimes, the background of my IDE is the only source of light in the room. :)

  11. Loved the dark theme Aaron. also exporting the options following your 'Smart Way' was a breeze. Thanks as always 👍

  12. Thanks for the theme, Aaron! Quick question- is it possible to change the theme of the query results and/or the object explorer?

    1. Not in any supported way that I'm aware of.

      You can change the font face and size, and Object Explorer responds to the new Environment Font setting, but otherwise no those color schemes are likely only receptive to Windows theme changes if at all.

  13. It is pitty that MS still didn't create the full dark themes for SSMS (including object explorer colors, properties window colors, etc). But your theme helps to reduce discomfort of using original bright theme. Thanks you.

  14. Aaron,
    Thank you for this once again, after few attempts to make this work and SSMS crashing I gave it up but then saw another person 'Dallins' comments on how to use the 'use team settings file' and imported your file and it works perfectly now. Thank you.Hope this helps some others.

  15. Aaron, I have tried doing this twice and my management studio just seems to be hanging and going nowhere. I am stuck in the importing settings from AB:darkScheme…
    Is there something I am missing? I am trying it on sql 2014 SSMS.

    1. Does this happen with other .vssettings files or just mine? Do you have the fonts I use (Consolas and Calibri)? Maybe there is a hidden modal dialog off screen or behind the window? If you leave it like that overnight and come back will it still be hanging? Does it ever crash? If it crashes maybe you can submit the crash details and/or dump file to Microsoft support.

  16. Hi, downloaded vs2015_black_vs2015.vssettings, used the Import wizard. When on the screen where you select the collection of settings to import. I have a browse button to browse to a file. When browsing to the file downloaded it, I get the following error:

    "The file c:\… was created with an unsupported version of this application and cannot be added to the settings list."

    My version: 12.0.2569.0

    I tried abandoned-spaceship-corridors_vs2015.vssettings with the same result.

    1. I can't imagine changing a font setting in Tools/Options will disable entire bits of functionality. Can you give more details? What version of SSMS, what version of SQL Server are you connecting to, and how exactly did you isolate the problem to the .vssettings file I've provided here?

      If you're connecting to Express Edition, for example, it is probably due to this bug, and nothing to do with applying any .vssettings file:

      https://connect.microsoft.com/SQLServer/Feedback/Details/2883440

  17. Thanks, for the RGB ! (For security reason I don't think it's wise to upload an unknown unzip)

    Others think I'm crazy but I need a dark theme for my eyes !

    1. Hi xian,

      If you are asking if it's possible to color the XML differently than the default? Yes. There's a whole section at the bottom of the box for various XML elements.

      If you are asking if I can update my download to include custom coloring for the XML, well I don't use XML documents inside of SSMS enough to have even done that for myself, so something I could look into down the road I suppose.

      A

  18. My management studio seems to flash the text with a white background on cursor hover. Very annoying. Any ideas.

      1. This seems to happen when mousing over the bar that has the +/- collapse tools on it, to the right of the text. Running SSMS 11.0.5343.0 from SQL Server 2012, and it doesn't look like I have any other toys installed at this point in time.

        Changing Collapsible Text to Automatic made it stop.

        1. I changed most of the 'Blue' or 'Navy' XML values to 'Teal', and it's visible again. That dark blue on black selection really messes up MY eyes at least.

          1. Yeah, I did not do anything with XML color coding (I just don't use that feature enough, preferring an external editor), and no matter what blue I pick for anything, it won't be right for someone.

  19. I would like to change Result, Message & Object Explorer Windows as well to dark theme. I possible also skin of the whole SSMS. Any Advice?

    Thanks!

  20. Hi Aaron,
    Thank you for sharing this. Do you know of a way to identify the Display item for parts of T-SQL? For example, I set a color for Display item 'SQL Stored Procedure,' and at first it appeared to not work. After experimenting, it appears to affect only system stored procedures. If possible, I'd like to skip the experimenting.

    I've tried searching BOL, looking at Templates and execution plan xml, and various web searches. But so far no luck. Do you have any ideas?

    Take care.

    1. I don't, sorry. I learned what I know through experimenting, basically create a T-SQL script with at least one instance of every type of thing I want colored, apply changes, rinse, repeat. Some of the display item names are less than intuitive, and some are downright misleading. I think that drop-down list is *the* documentation as far as the SQL Server team is concerned.

    2. Not sure if you asking about this.

      Go to the "Fonts and Colors" section and locate the item called "Identifier". DO NOT USE "Default" for the item foreground. Instead, change it to whatever color that is not default. (To be on the safe side, do not use the same color as the "Plain Text" item either, so that VS 2010 won't think that you are using the default color. I don't know if this is really necessary, but that's what I did.)

      Now, your "Identifier" foreground color should display as "Custom" and the color value should be different from the "Plain Text" item, even just slightly different is fine. Save all the changes, and now Visual Studio 2010 will display the SQL variable in your custom color.

      This problem seems to be because when "Identifier" foreground is set to "Default", the SQL identifiers don't use the default color of the Plain Text. Instead, it grabs the teal color from a mysterious location (maybe somewhere in the code), so you have to tell it to NOT use the default color.

      Source:
      https://social.msdn.microsoft.com/Forums/vstudio/en-US/e93ab1bc-114a-45cb-a708-3dcd20911b00/how-do-i-change-the-color-of-the-teal-sql-variable-names?forum=vssetup

    1. Armando, I can try to help if you can provide some more details. What exact steps did you take? What error message did you receive (or if you didn't receive an error, explain what doesn't work means)? What is the exact build number of Management Studio (from Help -> About)?

      1. First, thank you for sharing.

        I just tried following these directions and everything worked up until I imported the settings. Each time I do SSMS stops responding. I tried restarting SSMS to no avail. This is my version etc.:

        Microsoft SQL Server Management Studio 2014 – 12.0.2430.0
        OS Windows 7 – 6.1.7601

        I would love to use these light on dark settings the quick and easy way. Please advise.

          1. Thank you for checking on it. After trying a few more things, I found it would apply no problem by following these steps:

            Download the settings file and extract
            Select Menu items: Tools > Options > Environment > Import and Export Settings
            Check the box "Use team settings file:"
            Browse to the extracted settings file
            Click OK

            This popped up the awesome new colors perfectly. I'm also curious if you know how to change the color scheme for the entire application, such as Object Explorer, Servers and Properties sections. Just curious. Thanks again for your help.

  21. :) Excellent, I only had to copy the values because I had to apply this to my Management Studio 2008. Good, really good.
    Many thanks.

    1. Hi Sergio, I believe it was introduced with the switch to the modern Visual Studio shell, so 2012+ (I'm a big advocate of using the most recent version of SSMS possible, even when managing downlevel instances).

  22. I love it!

    Thanks for sharing this, I been several times on the customization screen and thought… "bah!… too much work". Now all my laziness is justified! I love dark schemes, specially for programming, end of the day you notice the difference. Cheearzzz!

  23. Thanks for the post and the files. I have used light on dark in Visual Studio for years, but I've never changed it in SSMS. I tweaked it a little, I made the background a little darker, and the cyan highlight background a little darker (I couldn't read the text on my monitors when it was highlighted.)

    I don't know why I haven't tried this sooner.

  24. Thanks, Aaron! I've been trying to figure out a way to copy your SSMS settings for awhile. Now I can just import them :)

    1. SSMS 2008 R2 doesn't include the ability to import, so you've just gotta plug in the color values the slow way, but it only takes about 5 mihutes and then you have a nicer environment. While you are at it, download and install the "Hack" font – http://sourcefoundry.org/hack/

  25. Interesting. At a recent company I worked on, nearly every single C# dev worked with black background. I always joked that they were trying too hard to be trendy, but I can see that it may help against glare -especially if you are coding for long periods of time. Question for you Aaron, I presume you wouldn't present with this color scheme? I have always found black on white to be more visible to the audience at the right scale.

    1. No, this is how I've presented for at least a year. I've never had any complaints. With large enough fonts the colors become less relevant, but when I'm in the back of the room I do find light-on-dark easier to read.