Skip to content

Instantly share code, notes, and snippets.

@drmohundro
Last active December 15, 2015 23:19
Show Gist options
  • Save drmohundro/5339473 to your computer and use it in GitHub Desktop.
Save drmohundro/5339473 to your computer and use it in GitHub Desktop.
PowerShell snippet to output all colors.
[Enum]::GetNames([System.ConsoleColor]) |
foreach {
$foregroundColor = $_
$backgroundColor = 'Black'
if ($_ -eq 'Black') {
$backgroundColor = 'White'
}
Write-Host -foregroundcolor $foregroundColor -backgroundColor $backgroundColor $foregroundColor
}
@drmohundro
Copy link
Author

Sure makes me wish that Windows had a good 256 color terminal instead of a measly 16 colors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment