🚩 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
+,
.
This will open up a JSON file with the settings for your Terminal in the default editor.
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!
Top comments (6)
or use this? github.com/microsoft/terminal/tree...
That's for the Windows Console, not the new Windows Terminal.
Please consult,why your terminal tab color is dark color, my is Light Color??
how to change it to Dark Color?
Windows dark mode
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 commandWhich will list all colors in your editor as so: