A PowerShell module defining colors from Ethan Schoonover's excellent Solarized color scheme.
The heavy lifting of creating ANSI escape sequences is done by Pansies.
Install-Module Solarized
Get-SolarizedPalette
Two cmdlets are provided.
Get-SolarizedPalette
returns aPSCustomObject
with the entire palette.Get-SolarizedColor
returns a single color as aPoshCode.Pansies.RgbColor
object.
These can be used with the enhanced Write-Host
cmdlet from Pansies:
$fg = Get-SolarizedColor foreground
$bg = Get-SolarizedColor background
"Hello, world!" | Write-Host -ForegroundColor $fg -BackgroundColor $bg
Or using PowerLine to customize your prompt:
Add-PowerLineBlock {
Get-ShortenedPath -RelativeToHome | New-PromptText -Bg (Get-SolarizedColor bg -Highlight) -Fg (Get-SolarizedColor fg -Highlight)
}