loading...

Windows Terminal Color Schemes Roll Your Own Color Scheme in Windows Terminal

teckert profile image Thomas Eckert Updated on ・2 min read

🚩 Disclaimer: I work for Microsoft. I am writing this purely as a fan of Windows Terminal.
Also posted on my blog.

At Build 2019, Microsoft announced an open source terminal for Windows. On 21 June 2019, it became available for preview in the Microsoft Store. I have been playing with it since and while its features are laudable, every developer knows the most important aspect of a terminal is its color scheme.

Luckily, it's easy to write your own. From the Windows Terminal, select the dropdown at the right edge of the tabs. Select Settings. Alternatively, the default keybinding for accessing settings is Ctrl+,.

A Windows Terminal window showing the user accessing settings by the dropdown at the right edge of the tabs.

This will open up a JSON file with the settings for your Terminal in the default editor.

The JSON file for editing Windows Terminal settings edited using Visual Studio Code.

Navigate to the "schemes" key. Here a list of JSON objects map standard Unix terminal colors (except for magenta which is called purple) to HEX codes. Copy an existing scheme and paste it into this list. Now, you can edit the colors as you like. I chose to implement a color scheme from flatuicolors.com called V1. You can find the implementation in a Gist here.

Give your scheme a unique "name" value and set the "profiles" to use that scheme.

As you edit the scheme, the Terminal will update in real time. To check your scheme, I have found the following bash command useful:

for x in {0..8}; do for i in {30..37}; do for a in {40..47}; do echo -ne "\e[$x;$i;$a""m\\\e[$x;$i;$a""m\e[0;37;40m "; done; echo; done; done; echo ""

This will display every text color on every highlight color. I used it to create this sample for the Gist:

Happy hacking!

Posted on Jun 25 '19 by:

teckert profile

Thomas Eckert

@teckert

Proficient in Microsoft, word.

Discussion

markdown guide
 

The bash command you've provided in the post. I'm not able to use that command in PowerShell window. Please help.

 

Certainly! bash refers to a particular type of shell, different from PowerShell. While I don't know how to reproduce the exact same output in PowerShell, a fair replacement is the command

[enum]::GetValues([System.ConsoleColor]) | Foreach-Object {Write-Host $_ -ForegroundColor $_}   

Which will list all colors in your editor as so:

Terminal colors shown in PowerShell

 

Please consult,why your terminal tab color is dark color, my is Light Color??
how to change it to Dark Color?