Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 1.19 KB

File metadata and controls

44 lines (29 loc) · 1.19 KB

Solarized

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.

Installing

Install-Module Solarized
Get-SolarizedPalette

Usage

Two cmdlets are provided.

  • Get-SolarizedPalette returns a PSCustomObject with the entire palette.
  • Get-SolarizedColor returns a single color as a PoshCode.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)
}

Other Solarized-related PowerShell projects