20

Is there a place where I can find Powershell Color Schemes that people have already built? Something like https://github.com/lysyi3m/osx-terminal-themes, but for Windows Powershell instead of OSX.

I did find this one: https://github.com/Segaso/MonokaiTheme, but I'm confused as to where I find this "Tools". When I right click on the top of any PowerShell window, all I see is this:

enter image description here

And this is all I see under properties:

enter image description here

wheeeee
  • 1,046
  • 2
  • 14
  • 33
  • In case you're using Visual Studio Code terminal, you can try something like this: https://marketplace.visualstudio.com/items?itemName=yasht.terminal-all-in-one Pretty handy, though a general solution. – carloswm85 Dec 27 '21 at 11:31
  • As a long term Linux user, my eyes hurt when using the default Powershell color scheme. Whoever designed Powershell has poor aesthetic sense. – uPhone Jul 31 '23 at 20:52

5 Answers5

23

Microsoft itself released last year Windows Console Colortool

It works with/modifes the palette of any console app (cmd/Powershell/WSL-bash).

The colortool will work with any .itermcolors scheme.

download from github

enter image description here

Community
  • 1
  • 1
  • 4
    Works well for CMD. Not so much for Powershell... it makes the background purple. – Jay Sep 29 '18 at 15:07
  • Only works for Powershell current session when you use the -b option. – b01 Mar 23 '19 at 14:51
  • Issues with PowerShell redefining color table entries #5,#6 are discussed in this blog referencing the [new terminal](https://devblogs.microsoft.com/commandline/new-experimental-console-features/) –  Jun 01 '19 at 22:50
  • They keep on updating this tool, but they never link to the executable. Very annoying. Any idea where to find it? – not2qubit Jan 30 '22 at 09:26
19

Its easy. You can run these commands in powershell. This is a custom made color scheme.

$Host.UI.RawUI.BackgroundColor = ($bckgrnd = 'Black')
$Host.UI.RawUI.ForegroundColor = 'White'
$Host.PrivateData.ErrorForegroundColor = 'DarkRed'
$Host.PrivateData.ErrorBackgroundColor = $bckgrnd
$Host.PrivateData.WarningForegroundColor = 'Yellow'
$Host.PrivateData.WarningBackgroundColor = $bckgrnd
$Host.PrivateData.DebugForegroundColor = 'Yellow'
$Host.PrivateData.DebugBackgroundColor = $bckgrnd
$Host.PrivateData.VerboseForegroundColor = 'Green'
$Host.PrivateData.VerboseBackgroundColor = $bckgrnd
$Host.PrivateData.ProgressForegroundColor = 'Blue'
$Host.PrivateData.ProgressBackgroundColor = $bckgrnd
Clear-Host

If you want to have your own scheme you can choose colors as you wish.

To get the list of the colors. Run below command.

get-help write-host

You will get all colors available for powershell.

Mustkeem K
  • 8,158
  • 2
  • 32
  • 43
  • The slick "assign and set" move didn't work for me. If I resized the window, and even in the prompts, the `RawUI` background value didn't take. I had to run `$bckgrnd = 'Black'` on its own line and then `$Host.UI.RawUI.BackgroundColor = $bckgrnd` to the color to take. But now I need to add that so that it's invoked each time I open Powershell like a `.bashrc` or `autoexec.bat`. How do I do that? **Update:** [This page seems to show how to add to your profile](https://beebom.com/how-change-powershell-color-scheme-windows-10/). – ruffin Jan 06 '21 at 19:14
2

You will find this in ISE Powershell

enter image description here

enter image description here

Bonneau21
  • 544
  • 1
  • 5
  • 20
2

I use this for the color scheme.it has solarized-dark theme. Make sure you backup your current preset with concfg export console-backup.json once you have installed scoop and concfg. For more use this link https://github.com/lukesampson/concfg

as - if
  • 2,729
  • 1
  • 20
  • 26
  • Thanks for this, I was looking for an alternative to the default Blue and solarized-dark looks like a great scheme. Shame it doesn't keep cmd as default but that's okay – Benjamin Wall Mar 19 '21 at 10:40
0

Tagging on to the response by @user6811411, you could also use the entire Windows Terminal app, which integrates the colour tool and is available from the Microsoft Store. In the app's settings, you can change the colour scheme quite easily.

The colour will only be changed for PowerShell sessions started from within the app, but I find it quite useful to organize all my terminals in one window, so that this was not a big downside for me. I also liked the option to define customized shells.

Samufi
  • 2,465
  • 3
  • 19
  • 43