From 4964aad780bc58b8f6ec4c049ea388e3dc61b042 Mon Sep 17 00:00:00 2001 From: Michael Ratanapintha Date: Mon, 14 Aug 2017 15:11:46 -0700 Subject: [PATCH] ColorTool: Restore old console colors after printing the console table Unfortunately, when you run `.\colortool.exe --current`, you might notice that the color of the prompt printed after the program finishes is slightly different from what it was before you ran the program. This changelist fixes the issue by restoring the old console colors after the program finishes printing the color table. Testing: manual --- tools/ColorTool/ColorTool/Program.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/ColorTool/ColorTool/Program.cs b/tools/ColorTool/ColorTool/Program.cs index b2a5002eb..d65507d51 100644 --- a/tools/ColorTool/ColorTool/Program.cs +++ b/tools/ColorTool/ColorTool/Program.cs @@ -170,6 +170,10 @@ namespace ColorTool } Console.Write("\n"); + + // Reset foreground and background colors + Console.ForegroundColor = currentForeground; + Console.BackgroundColor = currentBackground; } static bool SetProperties(uint[] colorTable)