Color Handling in AnsiConsole

This commit is contained in:
Peter Schneider 2016-03-22 16:49:08 +01:00
parent ede74b6be1
commit d80218ab42
2 changed files with 3 additions and 3 deletions

View file

@ -130,7 +130,7 @@ namespace Microsoft.DotNet.Cli.Build.Framework
SetColor(ConsoleColor.Gray); SetColor(ConsoleColor.Gray);
break; break;
case 39: case 39:
SetColor(OriginalForegroundColor); Console.ForegroundColor = OriginalForegroundColor;
break; break;
} }
} }

View file

@ -38,8 +38,8 @@ namespace Microsoft.DotNet.Cli.Utils
Console.ForegroundColor = Console.ForegroundColor =
c < 0 ? color : // unknown, just use it c < 0 ? color : // unknown, just use it
_boldRecursion > 0 ? (ConsoleColor)(c & ~Light) : // ensure color is dark _boldRecursion > 0 ? (ConsoleColor)(c | Light) : // ensure color is light
(ConsoleColor)(c | Light); // ensure color is light (ConsoleColor)(c & ~Light); // ensure color is dark
} }
private void SetBold(bool bold) private void SetBold(bool bold)