mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-23 05:01:37 +01:00
Update list-console-colors.ps1
This commit is contained in:
parent
4b32817170
commit
8ff0cf558a
@ -6,8 +6,8 @@
|
|||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./list-console-colors
|
PS> ./list-console-colors
|
||||||
|
|
||||||
Name Foreground Background
|
Color As Foreground As Background
|
||||||
---- ---------- ----------
|
----- ------------- -------------
|
||||||
...
|
...
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
@ -18,11 +18,13 @@
|
|||||||
try {
|
try {
|
||||||
$Colors = [Enum]::GetValues([ConsoleColor])
|
$Colors = [Enum]::GetValues([ConsoleColor])
|
||||||
""
|
""
|
||||||
"Name `tForeground `tBackground"
|
"Color As Foreground As Background"
|
||||||
"---- `t---------- `t----------"
|
"----- ------------- -------------"
|
||||||
foreach($Color in $Colors) {
|
foreach($Color in $Colors) {
|
||||||
write-host -noNewline "$Color `t"
|
$Color = "$Color "
|
||||||
write-host -noNewline -foregroundcolor $Color "$Color `t"
|
$Color = $Color.substring(0, 15)
|
||||||
|
write-host -noNewline "$Color"
|
||||||
|
write-host -noNewline -foregroundcolor $Color "$Color"
|
||||||
write-host -noNewline -backgroundcolor $Color "$Color"
|
write-host -noNewline -backgroundcolor $Color "$Color"
|
||||||
write-host ""
|
write-host ""
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user