Skip to content

Instantly share code, notes, and snippets.

@timabell

timabell/ps-colours.ps1

Last active Sep 8, 2020
Embed
What would you like to do?
output all the colour combinations for text/background in powershell
# output all the colour combinations for text/background
# http://stackoverflow.com/a/41954792/10245
$colors = [enum]::GetValues([System.ConsoleColor])
Foreach ($bgcolor in $colors){
Foreach ($fgcolor in $colors) { Write-Host "$fgcolor|" -ForegroundColor $fgcolor -BackgroundColor $bgcolor -NoNewLine }
Write-Host " on $bgcolor"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.