Enable-BlackISE

I have been asked a few times about the color scheme I use in PowerShell ISE. I can’t take credit for designing it. The work was done by David Mohundro. You can find his post at http://www.mohundro.com/blog/2008/12/31/PowerShellISEThemes.aspx.  Here is my version of the function. It simply uses the $psISE variable to mess with the token colors.

001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
Function Enable-BlackISE {   
    $psISE.Options.FontName = 'Consolas'
    $psISE.Options.FontSize = 14 
    $psISE.Options.OutputPaneBackgroundColor = '#FF000000'
    $psISE.Options.OutputPaneTextBackgroundColor = '#FF000000'
    $psISE.Options.OutputPaneForegroundColor = '#FFFFFFFF'
    $psISE.Options.CommandPaneBackgroundColor = '#FF000000'
    $psISE.Options.ScriptPaneBackgroundColor = '#FF000000'
    $psISE.Options.TokenColors['Command'] = '#FFFFFF60'
    $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'] = '#FFAEAEAE'
    $psISE.Options.TokenColors['String'] = '#FF00D42D'
    $psISE.Options.TokenColors['Keyword'] = '#FFFFDE00'
    $psISE.Options.TokenColors['Attribute'] = '#FF84A7C1'
    $psISE.Options.TokenColors['Type'] = '#FF84A7C1'
    $psISE.Options.TokenColors['Variable'] = '#FF00D42D'
    $psISE.Options.TokenColors['CommandParameter'] = '#FFFFDE00'
    $psISE.Options.TokenColors['CommandArgument'] = '#FFFFFFFF'
    $psISE.Options.TokenColors['Number'] = '#FF98FE1E'
}

Have fun. It would be great to see what other kinds of themes people can come up with.

Comments (3) -

Hey Andy, thanks for the link - I've been meaning to convert a few of my other color themes over as well, so hopefully your post will provide me with enough incentive to do that Smile

Michael Soza 7/6/2010 5:07:06 PM

Hi guys, the theme is great, the thing i don't understand is why in the original site of David appears Xml mixed with powershell, I try to dot source but the errors that came up is that the < operators is reserved for future use, and that is evident, so what im missing? how can i use the original theme, how that syntax is valid?

Michael Soza 7/6/2010 8:07:41 PM

Wou....was a bug in Chrome...........i open the site in Firefox and i see the code correct, in chrome i see this http://www.voodoomsr.com/resources/chromebug.png, also if I copy the code with the links that I provide i get the same bad code (xml mixed with powershell code), weird bug.

Comments are closed