InterpolatedColorConsole 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package InterpolatedColorConsole --version 1.0.1                
NuGet\Install-Package InterpolatedColorConsole -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="InterpolatedColorConsole" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add InterpolatedColorConsole --version 1.0.1                
#r "nuget: InterpolatedColorConsole, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install InterpolatedColorConsole as a Cake Addin
#addin nuget:?package=InterpolatedColorConsole&version=1.0.1

// Install InterpolatedColorConsole as a Cake Tool
#tool nuget:?package=InterpolatedColorConsole&version=1.0.1                

Interpolated Color Console

Yes, it's yet another Colored Console. But where colors can just be interpolated within strings, making it easier to use multiple colors.

Examples

using (ColoredConsole.WithColor(ConsoleColor.Blue))
{
    Console.WriteLine(@"
  _____       _                        _       _           _    _____      _            
 |_   _|     | |                      | |     | |         | |  / ____|    | |           
   | |  _ __ | |_ ___ _ __ _ __   ___ | | __ _| |_ ___  __| | | |     ___ | | ___  _ __ 
   | | | '_ \| __/ _ \ '__| '_ \ / _ \| |/ _` | __/ _ \/ _` | | |    / _ \| |/ _ \| '__|
  _| |_| | | | ||  __/ |  | |_) | (_) | | (_| | ||  __/ (_| | | |___| (_) | | (_) | |   
 |_____|_| |_|\__\___|_|  | .__/ \___/|_|\__,_|\__\___|\__,_|  \_____\___/|_|\___/|_|   
                          | |                                                           
                          |_|
");


    ColoredConsole.WriteLine("The default color was changed by the context");
    Console.WriteLine("It doesn't matter if I write with ColoredConsole or regular Console");
    ColoredConsole.WriteLine($"But the {ConsoleColor.Yellow}ColoredConsole{ConsoleColor.Red} allows us to change colors directly using embedded colors in interpolated strings");
}
Console.WriteLine($"After the context ({ConsoleColor.White}WithColor(){ConsoleColor.Blue}) is disposed, the previous color is restored.");


ColoredConsole.WriteLine();


using (ColoredConsole.WithColor(ConsoleColor.Yellow, ConsoleColor.Blue))
{
    ColoredConsole.WriteLine("We can set algo background colors");
    ColoredConsole.WriteLine($"And {ConsoleColor.Black}we can also {ConsoleColor.White:background}change background color within interpolated strings");
}

ColoredConsole.WriteLine("All back to normal! Enjoy!");

ColoredConsole.WriteLine(ConsoleColor.Green, $"Did you like it? Please give me a {ConsoleColor.Yellow}star{Symbols.PREVIOUS_COLOR} at {ConsoleColor.Blue}https://github.com/Drizin/InterpolatedColorConsole{Symbols.PREVIOUS_COLOR}");

License

MIT License

See full documentation here

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on InterpolatedColorConsole:

Package Downloads
CodegenCS.Runtime

Class Library and Toolkit for Code Generation using plain C#

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on InterpolatedColorConsole:

Repository Stars
Drizin/CodegenCS
C# Toolkit for Code Generation (T4 alternative!)
Version Downloads Last updated
1.0.3 2,638 8/8/2022
1.0.2 431 7/30/2022
1.0.1 389 7/25/2022
1.0.0 388 7/23/2022