Scott Hanselman

Get Solarized - Awesome command prompt colors for VS, VS Code, cmd, PowerShell, and more

June 17, 2017 Comment on this post [17] Posted in Musings
Sponsored By

imageI was on a call with my co-worker Maria today and she commented on how nice my command prompt in Windows looked. I told it was "Solarized" and then our conference call fell apart as we collected all kinds of fun info about how you can get Solarized in your favorite apps on Windows.

Solarized is a sixteen color palette (eight monotones, eight accent colors) designed for use with terminal and gui applications. It's by Ethan Schoonover and it's spread all over the web. You can see screenshots and learn about it on GitHub.

Solarized for your Windows Command Prompt (cmd, powershell, bash)

By default when you right click and hit properties on a shortcut for a prompt like cmd, powershell, or bash, you'll get a dialog that looks like this.

Default Colors in CMD

You'll see there's 16 colors, usually 8 colors on the left, and then the "light/intense/bold" version of each color on the right. I usually used Intense Terminal Green on black before Solarized.

Those values (the defaults) are stored in the registry here HKEY_CURRENT_USER\Console

Where default colors are stored in the Registry

Those defaults are used for NEW shortcuts or consoles that start afresh, via Windows+R. This won't change existing shortcuts you may already have created. There's a few ways to fix this.

I've found the easiest manual way is to recreate the shortcuts. You can do this by just copy-pasting a shortcut and using the new one.

However, there is talk of programmatically updating .lnk (Start Menu link files) with PowerShell.

You'd just go to the location of each LNK file you want to change, then run Update-Link.ps1 YOURLINK.LNK "light|dark" and it'll load up the .lnk file using Windows APIs and save it with a new Color Table.

I've started that work here and I'll PR the main repo if I can solve one issue - I can't get it to switch to Solarized Light, just Dark. It might be something wrong on my side. Please take a look if you're a Win32/PowerShell internals type.

Here I went to where the Start Menu stores most of the LNK files. You can also search for an item in your start and right-click "Open File Location."pow

Programatically Update your LNKs with PowerShell

Here's before and after with my Developer Command Prompt for Visual Studio 2015.


NOTE: Once this is done, in cmd.exe you can also switch between light and dark with "color f6" or "color 01" which is nice for presentations. I'm not sure how to do this yet in PowerShell or Bash.

Here is the palette after:

Solarized Palette

For PowerShell there is also an extra-step you'll want to put into your Microsoft.PowerShell_profile.ps1 where you map things like Errors, Progress Bars, and Warnings internally in PowerShell. Be sure to read the instructions.

Solarized in Visual Studio and Visual Studio Code

As for Visual Studio and Visual Studio Code, they're far easier. You can just Ctrl-K then Ctrl-T in VSCode and pick Solarized.

Solarized in VS Code

For Visual Studio (all versions) you can head over to @leddt's GitHub and download settings files for Solarized that you can then import info VS from Tools | Import and Export Settings.

Sponsor: Big thanks to Raygun! Don't rely on your users to report the problems they experience. Automatically detect, diagnose and understand the root cause of errors, crashes and performance issues in your web and mobile apps. Learn more.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
June 17, 2017 5:36
Alternatively, there's this: Console which allows for tabbed console windows and custom color schemes. Fantastic stuff.
June 17, 2017 14:24
Solarized is good. But I am more into Monokai.
June 17, 2017 21:38
It's crap this solazied thing .... can't even see =. , please try before promoting some bull shit stufff..... just because u can doesn't mean u have to
June 17, 2017 22:59
@Ben There is no need for you to post a comment with that attitude. If you don't like the blog or what Scott does, which he does out of the kindness of his heart and on his own time, then don't read it. It's a pretty simple concept.
June 18, 2017 1:18
Thousands of people love Solarized -- not sure where anyone gets off saying "try before promoting." That's just rude, hurtful and trollish.
June 18, 2017 2:36
I've been using this for years now and I love it. I usually change the font to envy code pr or Input. But the dark setting is great and it's great that it is available on Vim, ConEMu, tons of others.
June 18, 2017 3:12
Speaking of this, when are we gonna get an update to your Ultimate Dev Tools list? It's been 3 years now.
June 18, 2017 5:42
Monokai > Solarized. That is all.
June 18, 2017 9:27
I've found that the best way to change color for Windows command line is by using this tool:

You can just do: concfg import solarized

Without touching registry and stuffs.
June 19, 2017 9:17
You kids with your colors and free love and iwatches and zunes! In my day we had amber CRTs and we damn well liked it!
June 19, 2017 10:54
Thanks for the hint, Scott! This is very nice, especially compared to the standard configuration cmd comes with in the first place.
June 19, 2017 11:08

In my youth we used to dream of CRTS. Every night my father would...
June 19, 2017 12:45
Any ideas how to set the opacity? The NT_CONSOLE_PROPS doesnt contain a field of the a@href= are out of date
June 19, 2017 12:46
Any ideas how to set the opacity? The NT_CONSOLE_PROPS doesnt contain a field of the docs are out of date
June 19, 2017 17:36

June 19, 2017 18:07
Solarized > Monokai \o/
June 19, 2017 21:26
The Solarized in vs 2015 from link does not match vs Code?

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.