Making SSMS Pretty : My Dark Theme - SentryOne Team Blog

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.

Comments ( 65 )

                              • Raj says:

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

                              • The Dude says:

                                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?

                              • Aaron Bertrand says:

                                Sorry, should have been 120.

                              • Neeraja Rajeev says:

                                Thanks for sharing.! Awesome theme.!

                              • Duke Wang says:

                                Thanks for sharing this theme.

                              • Noe says:

                                Love it! This worked like magic

                                Thank you!

                              • Jeff says:

                                This worked for me in 2016. I love it, thanks.

                              • Frans says:

                                This is so much easier on my eyes. Thank you.

                              • Jason Hall says:

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

                              • Varun Dhawan says:

                                Loved the dark theme Aaron. also exporting the options following your 'Smart Way' was a breeze. Thanks as always đź‘Ť

                              • Mehmet says:

                                Thanks very much

                              • Balt says:

                                Nice! A lot easier to read…thank you!

                              • Amr Swalha says:

                                Thanks for the tip, working well with sql server 2016 management studio.

                              • Thomas says:

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

                              • Aaron Bertrand says:

                                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.

                              • Igor says:

                                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.

                              • Cuneyd says:

                                Thanks for your great work. Specilay for Large one :-)

                              • Lakshmi saripali says:

                                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.

                              • Found SSMS Monokai Theme says:

                                I found a Monokai Theme for SSMS. This guy has a download for his theme too.

                                https://mikesdatawork.wordpress.com/2016/06/04/how-to-use-mikes-ssms-2016-theme/

                              • Omran says:

                                This is great !
                                Worked perfect for me on SQL 2014
                                Thanks for sharing !

                              • Marcelo says:

                                It did't work for me

                              • Aaron Bertrand says:

                                Sorry, I don't know what that means, whether that happens with all .vssettings files or just mine, what version you're using, etc…

                              • lakshmi saripalli says:

                                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.

                              • Aaron Bertrand says:

                                Hmmm, not sure lakshmi, I don't know that I can troubleshoot your copy of SSMS. You may have to apply the settings manually.

                              • Aaron Bertrand says:

                                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.

                              • Sid says:

                                Brilliant. Thanks for sharing!

                              • Neville says:

                                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.

                              • Aaron Bertrand says:

                                Hi Neville, I'm not familiar with those files, where did you download them from, and are you sure they're meant to be used in SSMS?

                              • Juan Garcia says:

                                your theme made disappear New Table from Management Studio…

                              • Aaron Bertrand says:

                                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

                              • Victor Sosa says:

                                This is awesome! Thanks for sharing.

                              • dave says:

                                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 !

                              • David Lambl says:

                                Thanks for saving my eyes!

                              • xian says:

                                Aaron can you apply your colors to the XML elements also?

                              • Aaron Bertrand says:

                                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

                              • adrian says:

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

                              • Aaron Bertrand says:

                                I'm not seeing that behavior. What version are you using? Have you made any other customizations to Environment > Fonts & Colors?

                              • jadawin says:

                                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.

                              • jadawin says:

                                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.

                              • Aaron Bertrand says:

                                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.

                              • Parikshith says:

                                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!

                              • Aaron Bertrand says:

                                No, sorry, I don't know of any way to change other areas of SSMS without changing the entire Windows theme. See my reply to Dallin.

                              • Martin says:

                                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.

                              • Aaron Bertrand says:

                                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.

                              • Rahul says:

                                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

                              • Armando Padilla says:

                                I tried with SQL Server 2014 Express but it doesn´t work :(

                              • Aaron Bertrand says:

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

                              • Dallin says:

                                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.

                              • Aaron Bertrand says:

                                Hmm, I haven't heard of anyone coming across that symptom, sorry.

                              • Dallin says:

                                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.

                              • Aaron Bertrand says:

                                Hi Dallin, glad you got it working, and no, I don't know of any way to customize the colors of other areas of the UI, sorry.

                              • Ryan Mueller says:

                                Thanks so much. Just imported into SSMS 2014 with no problems.

                              • MeM says:

                                Thanks for the theme ;)

                              • Jairo MartĂ­nez says:

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

                              • Pradeep says:

                                Love this color formatting. Guess I am the one who triggered this post :).

                              • sergio says:

                                Hi SQL Server version is that it has import and export settings wizard?

                              • Aaron Bertrand says:

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

                              • Aubry Maciel says:

                                Great theme!
                                Congrats!

                              • ZQL says:

                                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!

                              • Keith says:

                                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.

                              • Jeff says:

                                A good resource for these themes here: https://studiostyl.es/

                                Personally I use Sex Panther. 60% of the time it works every time. :)

                              • Lori says:

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

                              • kP says:

                                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/

                              • retracement says:

                                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.

                              • Aaron Bertrand says:

                                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.

                              Leave A Comment

                              Your email address will not be published.