Powershell ISE Editor in Windows High Contrast Theme

1.6k Views Asked by At

I've recently started using powershell ISE and realized that the ISE's themes for text editor and console don't work when windows is set to any High Contrast theme. So basically for ISE the background is BLACK and all the text is WHITE, that's it. (Though font and its size can be changed.) The BLACK and WHITE appearance is because of my current High Contrast theme, i think. (BLACK windows background, and WHITE foreground text.)

I was wondering if there is any trick to enable the normal (dark, or my custom) themes of ISE when my windows is in High Contrast. FYI, same is the case for Microsoft Visual Studio, but that can be solved by tweaking the registries for its themes. But, I couldn't find any valuable registries for powershell themes anyway, so couldn't do much about it.

I mostly use my laptop at night (with almost no light) so I don't want to change my windows theme.
In short, help?
Btw, windows is 8.1 and powershell is 4.0 (default for win 8.1, I guess.)
P.S: New here, be gentle :)

1

There are 1 best solutions below

1
On

ISE supported importing your own themes in the form of xml files with ps1xml extensions. If you google around you can find a lot; here is a good resource: this one.

You can also utilize the $psISE object which has many properties you can set with hex, as you see fit such as:

# fonts
$psISE.Options.FontName = 'Monaco'
$psISE.Options.FontSize = 10

# output pane
$psISE.Options.OutputPaneBackgroundColor = '#FF2E3436'
$psISE.Options.OutputPaneTextBackgroundColor = '#FF2E3436'
$psISE.Options.OutputPaneForegroundColor = '#FFFFFFFF'

# command pane
$psISE.Options.CommandPaneBackgroundColor = '#FF2E3436'

# script pane
$psISE.Options.ScriptPaneBackgroundColor = '#FF2E3436'

# tokens
$psISE.Options.TokenColors['Command'] = '#3ca0d0'
$psISE.Options.TokenColors['Unknown'] = '#FFFFFFFF'
$psISE.Options.TokenColors['Member'] = '#FFFFFFFF'
$psISE.Options.TokenColors['Position'] = '#FFFFFFFF'
$psISE.Options.TokenColors['GroupEnd'] = '#FFFFFFFF'
$psISE.Options.TokenColors['GroupStart'] = '#FFFFFFFF'
$psISE.Options.TokenColors['LineContinuation'] = '#FFFFFFFF'
$psISE.Options.TokenColors['NewLine'] = '#FFFFFFFF'
$psISE.Options.TokenColors['StatementSeparator'] = '#FFFFFFFF'
$psISE.Options.TokenColors['Comment'] = '#009999'
$psISE.Options.TokenColors['String'] = '#F83E5B'
$psISE.Options.TokenColors['Keyword'] = '#33CDC7'
$psISE.Options.TokenColors['Attribute'] = '#FF84A7C1'
$psISE.Options.TokenColors['Type'] = '#FF7940'
$psISE.Options.TokenColors['Variable'] = '#66CC00'
$psISE.Options.TokenColors['CommandParameter'] = '#009999'
$psISE.Options.TokenColors['CommandArgument'] = '#60d4ae'
$psISE.Options.TokenColors['Number'] = '#238C47'