J Atkin
J Atkin

Reputation: 3150

SQL Server Management Studio dark theme for whole program

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.

Upvotes: 22

Views: 22092

Answers (5)

MikeTV
MikeTV

Reputation: 765

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

Upvotes: 25

Drew Aguirre
Drew Aguirre

Reputation: 393

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

Upvotes: 2

sqllearner
sqllearner

Reputation: 377

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

Upvotes: -2

SliverNinja - MSFT
SliverNinja - MSFT

Reputation: 31651

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.

Upvotes: 6

Nolan Shang
Nolan Shang

Reputation: 2328

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}]

Upvotes: 11

Related Questions