Shotgun.ColorConsole 1.0.819.1606

Easy console color output control library.

Install-Package Shotgun.ColorConsole -Version 1.0.819.1606
dotnet add package Shotgun.ColorConsole --version 1.0.819.1606
<PackageReference Include="Shotgun.ColorConsole" Version="1.0.819.1606" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Shotgun.ColorConsole --version 1.0.819.1606
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Color Console V1.0

C# Console Color Plugin.

Published simultaneously at Shotgun.Libaray V1.2

http://the-x.cn?from=colorconsole

##Example

Shotgun.ColorConsole.ColorConsole.WriteLine("$R The foreground color is red");`

Equivalent:

var old=Console.ForegroundColor;
Console.ForegroundColor=Console.Red;
Console.WriteLine("The foreground color is red");
Console.ForegroundColor=old;

##Replacing System.Console with Injection

Console.WriteLine("$R sets the foreground color to red, which is invalid before injection!");
Shotgun.ColorConsole.ColorConsole.Inject();
Console.WriteLine("$R After injection, it takes effect!Like this!");
Console.WriteLine("@@G @G sets the background color to green.");

##Color Mapping

r => ConsoleColor.DarkRed
R => ConsoleColor.Red
g => ConsoleColor.DarkGreen
G => ConsoleColor.Green
b => ConsoleColor.DarkBlue
B => ConsoleColor.Blue
c => ConsoleColor.Cyan
C => ConsoleColor.DarkCyan
y => ConsoleColor.DarkYellow
Y => ConsoleColor.Yellow
w => ConsoleColor.Gray
W => ConsoleColor.White
m => ConsoleColor.DarkMagenta
M => ConsoleColor.Magenta
a => ConsoleColor.DarkGray
A => ConsoleColor.Black

*The lowercase letter stands for Dark Color , e.g. r is DarkRed and R is Red.

Color Console V1.0

C# Console Color Plugin.

Published simultaneously at Shotgun.Libaray V1.2

http://the-x.cn?from=colorconsole

##Example

Shotgun.ColorConsole.ColorConsole.WriteLine("$R The foreground color is red");`

Equivalent:

var old=Console.ForegroundColor;
Console.ForegroundColor=Console.Red;
Console.WriteLine("The foreground color is red");
Console.ForegroundColor=old;

##Replacing System.Console with Injection

Console.WriteLine("$R sets the foreground color to red, which is invalid before injection!");
Shotgun.ColorConsole.ColorConsole.Inject();
Console.WriteLine("$R After injection, it takes effect!Like this!");
Console.WriteLine("@@G @G sets the background color to green.");

##Color Mapping

r => ConsoleColor.DarkRed
R => ConsoleColor.Red
g => ConsoleColor.DarkGreen
G => ConsoleColor.Green
b => ConsoleColor.DarkBlue
B => ConsoleColor.Blue
c => ConsoleColor.Cyan
C => ConsoleColor.DarkCyan
y => ConsoleColor.DarkYellow
Y => ConsoleColor.Yellow
w => ConsoleColor.Gray
W => ConsoleColor.White
m => ConsoleColor.DarkMagenta
M => ConsoleColor.Magenta
a => ConsoleColor.DarkGray
A => ConsoleColor.Black

*The lowercase letter stands for Dark Color , e.g. r is DarkRed and R is Red.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.819.1606 48 8/19/2019