From 8ff0cf558ad47466ee7fa3b58a642df95ed792b0 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Sun, 17 Oct 2021 14:46:59 +0200 Subject: [PATCH] Update list-console-colors.ps1 --- Scripts/list-console-colors.ps1 | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Scripts/list-console-colors.ps1 b/Scripts/list-console-colors.ps1 index ec6046db..f359276e 100755 --- a/Scripts/list-console-colors.ps1 +++ b/Scripts/list-console-colors.ps1 @@ -6,8 +6,8 @@ .EXAMPLE PS> ./list-console-colors - Name Foreground Background - ---- ---------- ---------- + Color As Foreground As Background + ----- ------------- ------------- ... .NOTES Author: Markus Fleschutz ยท License: CC0 @@ -18,11 +18,13 @@ try { $Colors = [Enum]::GetValues([ConsoleColor]) "" - "Name `tForeground `tBackground" - "---- `t---------- `t----------" + "Color As Foreground As Background" + "----- ------------- -------------" foreach($Color in $Colors) { - write-host -noNewline "$Color `t" - write-host -noNewline -foregroundcolor $Color "$Color `t" + $Color = "$Color " + $Color = $Color.substring(0, 15) + write-host -noNewline "$Color" + write-host -noNewline -foregroundcolor $Color "$Color" write-host -noNewline -backgroundcolor $Color "$Color" write-host "" }