Created
March 31, 2021 11:10
-
-
Save CharlesIC/a72083b0fdcc527a221ecb09d424d438 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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