/ByteBit.RainbowConsole

Enrich System.Console with colors.

Primary LanguageC#GNU Lesser General Public License v3.0LGPL-3.0

ByteBit.RainbowConsole

Enrich System.Console with colors.

Great for use with String interpolation ($ sign).

Examples

static void Main( string[] args ) {
    var usingVariable = "Hello";
    Rainbow.Parse( $"{usingVariable:Cyan} {ConsoleColor.Red:world} using {ConsoleColor.Yellow:Rainbow} {ConsoleColor.Green:console}" ).RainbowWriteParsedText();

    Rainbow.RainbowWriteText( $"Greetings, this is {ConsoleColor.Red:hello world example} to {ConsoleColor.Green:you} using {nameof( ByteBit.RainbowConsole ):yellow}" );

    "Writing with colored line".ColoredLine( foregroundColor: ConsoleColor.Yellow );
}

Screenshot:

screenshot

Resources

Icons

Used Rainbow icon icon from Farm-Fresh Web using Creative Commons Attribution (by) licence.