Scott Hanselman

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

June 17, '17 Comments [18] 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.

Solarized!

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
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb
Saturday, 17 June 2017 01:36:23 UTC
Alternatively, there's this: Console which allows for tabbed console windows and custom color schemes. Fantastic stuff.
Ray Walters
Saturday, 17 June 2017 10:24:52 UTC
Solarized is good. But I am more into Monokai.
Fleet Command
Saturday, 17 June 2017 17:38:32 UTC
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
Ben
Saturday, 17 June 2017 18:59:20 UTC
@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.
Doug
Saturday, 17 June 2017 21:18:12 UTC
Thousands of people love Solarized -- not sure where anyone gets off saying "try before promoting." That's just rude, hurtful and trollish.
Saturday, 17 June 2017 22:36:53 UTC
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.
Saturday, 17 June 2017 23:12:01 UTC
Speaking of this, when are we gonna get an update to your Ultimate Dev Tools list? It's been 3 years now.
JRT
Sunday, 18 June 2017 01:42:54 UTC
Monokai > Solarized. That is all.
Robert Biddle
Sunday, 18 June 2017 05:27:04 UTC
I've found that the best way to change color for Windows command line is by using this tool:

https://github.com/lukesampson/concfg

You can just do: concfg import solarized

Without touching registry and stuffs.
Ryan
Monday, 19 June 2017 05:17:15 UTC
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!
st
Monday, 19 June 2017 06:54:43 UTC
Thanks for the hint, Scott! This is very nice, especially compared to the standard configuration cmd comes with in the first place.
Oliver
Monday, 19 June 2017 07:08:00 UTC
@st

In my youth we used to dream of CRTS. Every night my father would...
Harry Solsem
Monday, 19 June 2017 08:45:55 UTC
Any ideas how to set the opacity? The NT_CONSOLE_PROPS doesnt contain a field of the a@href=https://msdn.microsoft.com/en-us/library/windows/desktop/bb773359(v=vs.85).aspx@docs are out of date
Monday, 19 June 2017 08:46:48 UTC
Any ideas how to set the opacity? The NT_CONSOLE_PROPS doesnt contain a field of the docs are out of date
Monday, 19 June 2017 13:36:33 UTC
@scott koon, Pragmata Pro! PRAGMATA PRO. PRAAAAAAGMAAAAAAAAATTTAAAAAAAA PRRRRRRROOOOOO.

Quooston
Monday, 19 June 2017 14:07:57 UTC
Solarized > Monokai \o/
José Barbosa
Monday, 19 June 2017 17:26:07 UTC
The Solarized in vs 2015 from link does not match vs Code?
Sean
Wednesday, 21 June 2017 19:31:35 UTC
I was more useful thanks
very very thanks
Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, li, ol, pre, strike, strong, sub, super, u, ul) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Live Comment Preview

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