Skip to content

Instantly share code, notes, and snippets.

@CharlesIC
Created March 31, 2021 11:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CharlesIC/a72083b0fdcc527a221ecb09d424d438 to your computer and use it in GitHub Desktop.
Save CharlesIC/a72083b0fdcc527a221ecb09d424d438 to your computer and use it in GitHub Desktop.
$colors = [enum]::GetValues([System.ConsoleColor])
$backgroundColors = @("Black", "White", "Blue", "DarkBlue", "Green", "DarkGreen", "Cyan", "DarkCyan", "Red", "DarkRed", "Magenta", "DarkMagenta", "Yellow", "DarkYellow", "Gray", "DarkGray")
Foreach ($bgcolor in $backgroundColors) {
Foreach ($color in $colors) { Write-Host " $color " -ForegroundColor $color -BackgroundColor $bgcolor -NoNewline }
Write-Host " on $bgcolor"
}
ForEach ($color in $colors) { Write-Host " $color " -ForegroundColor $color -NoNewline }
Write-Host " on host background"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment