Color Handling in AnsiConsole
This commit is contained in:
parent
ede74b6be1
commit
d80218ab42
2 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue