19

Is it possible to set the SSMS theme to all dark? I really like the dark theme in Visual Studio and SSMS is built on top of the VS shell. I saw this SQL Server Management Studio Skin / Appearance / Layout, but it is only for the query editor.

wonea
  • 4,783
  • 17
  • 86
  • 139
J Atkin
  • 3,080
  • 2
  • 19
  • 33
  • 1
    2014 and they still haven't done anything new with the SSMS UI. That's what happens when a company like Microsoft can't get on the same page with their products: [org chart](http://static2.businessinsider.com/image/4e0b3416cadcbb0d37010000-506-253/the-org-charts-of-all-the-major-tech-companies-humor.jpg) – Ein Doofus Mar 25 '16 at 17:14

5 Answers5

14

Since SQL Server Management Studio is built inside of the Visual Studio Shell, restoring the Visual Studio Dark color theme will apply the theme to elements in SSMS that are also in Visual Studio or use Visual Studio controls:

  • Window body
  • Main menus
  • Query editor
  • Solution Explorer
  • etc.

Successfully dark-mode'd sections of SSMS

The VS dark theme does not style elements that are unique to SSMS, leaving them well-lit:

  • Object Explorer
  • Messages panel
  • Execution plan panel
  • Connection dialog
  • etc.

Unsuccessful sections left in the light

The VS dark theme partially styles that are modified versions of VS controls, rendering them unattractive at best:

  • Results grid, where NULL values become white text on a light yellow background
  • Object Explorer context menus, where fly-out menus are displayed with black text on a dark grey background.

The poor few left in the rift between light and darkness


This is totally better than nothing, but really not ideal. It bothered me enough that developed a solution. Here's a screenshot:

SQL Shades

It's an SSMS add-on that automatically sets dark mode wherever possible, overriding SSMS' controls' colors. Check it out at sqlshades.com

MikeTV
  • 645
  • 6
  • 14
  • 4
    This post deserves more attention! This add-on literally does what Microsoft has dragged their feet on for years. – Holonet Jan 05 '23 at 17:35
  • You deserve some kind of award for this. My eyes thank-you. I'll be buying you a coffee for sure. – Woody May 25 '23 at 22:27
12

For SSMS 2016 Open C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\ssms.pkgundef Goto

// Remove Dark theme
[$RootKey$\Themes{1ded0138-47ce-435e-84ef-9ec1f439b749}]

and comment above settings,like this, then restart SSMS, you will sort there is a new option Dark in the Color theme option.

// Remove Dark theme
//[$RootKey$\Themes{1ded0138-47ce-435e-84ef-9ec1f439b749}]

SliverNinja - MSFT
  • 31,051
  • 11
  • 110
  • 173
Nolan Shang
  • 2,312
  • 1
  • 14
  • 10
  • 2
    This answer is not useful. As the owner of the question mentioned they know of the "Dark" mode. But it only changes the query editor and none of the actually useful UI features. This answer doesn't change how those elements look. – user1800978 Jul 22 '20 at 07:07
  • Upside: This is officially packaged into it. Downside: Does not apply dark theming to every window and view (this is the reason why it is hidden in the first place). - Given that there is no better solution, this seems like a decent partial step (better than nothing) until full dark mode support is added. – Kissaki Nov 18 '21 at 19:15
6

Here's the automated way to make it easier to enable SSMS Dark Theme in SQL Server 2014+. It's re-entrant also in case you've already executed it. It will make a backup first just in case you are concerned about recovery. Inspired by this manual guide.

PS CommandLet to Enable Dark SSMS Theme

function EnableDarkSSMSTheme() {
    $ssmsConfig = "C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\ssms.pkgundef"
    $fileContent = get-content $ssmsConfig 
    Set-Content -path ([System.IO.Path]::ChangeExtension($ssmsConfig, "backup")) -value $fileContent  # backup original file
    $startContext = $fileContent | Select-String "// Remove Dark theme" -context 0, 100 | Select-Object LineNumber, Line -ExpandProperty Context | select-object LineNumber, PostContext # grab start context
    $endContext = $startContext.PostContext | select-string "//" | Select Line, @{Name="LineNumber";Expression={$_.LineNumber + $startContext.LineNumber - 3}} -First 1 # grab end context, offset line # for ending
    for($i = $startContext.LineNumber-1; $i -le $endContext.LineNumber; $i++) { $fileContent[$i] = "//$($fileContent[$i])" } # prefix lines to comment
    Set-Content -path $ssmsConfig -value $fileContent # persist changes
}

EnableDarkSSMSTheme
kill -name ssms
start-process ssms

enter image description here

Note: For version upgrades v17.2 to v17.3, the program file configurations get overwritten and you have to re-apply this script.

Community
  • 1
  • 1
SliverNinja - MSFT
  • 31,051
  • 11
  • 110
  • 173
  • How to use this script? I've just tried to put this script in a `*,ps1` file and execute it. But nothing happens. – Alexander Abakumov Jul 18 '18 at 16:02
  • PS =Microsoft powershell. Anyway in the provided link you have a method that just requires edit a file – Daniel Perez Jan 29 '21 at 12:33
  • 3
    For SSMS 18, the file location seems to have changed - it is `C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\ssms.pkgundef`. And for all these years, the dark theme is still WIP.. -_- – Sнаđошƒаӽ May 05 '21 at 05:31
1

Answering this from 2022.

You can now use Azure Data Studio.

Azure Data Studio Supports Multiple Themes Including Dark Theme for SQL. Just click the "Manage" button, gear button at the bottom left corner > then click "Color Theme".

enter image description here

Drew Aguirre
  • 375
  • 2
  • 15
0

I just change my windows theme via high contrast and make some fine tune adjustments. This will get SSMS into full dark mode.

sqllearner
  • 371
  • 1
  • 3
  • 11
  • 1
    You put your entire Windows theme into high contrast? That seems infeasible if you just want MSSQLSMS in dark mode. Is the MSSQLSMS high contrast color theme you can select in the options not enough? And what are those “fine tune adjustments” you speak of? – Kissaki Nov 18 '21 at 17:51