C# Класс Pastel.ConsoleExtensions

Controls colored console output by .
Показать файл Открыть проект

Открытые методы

Метод Описание
Disable ( ) : void

Disables any future console color output produced by Pastel.

Enable ( ) : void

Enables any future console color output produced by Pastel.

FromColor ( ConsoleColor c ) : Color

Convert a ConsoleColor to a Color.

Pastel ( string input, Color color ) : string

Returns a string wrapped in an ANSI foreground color code using the specified color.

Pastel ( string input, ConsoleColor color ) : string

Returns a string wrapped in an ANSI foreground color code using the specified color.

Pastel ( string input, string hexColor ) : string

Returns a string wrapped in an ANSI foreground color code using the specified color.

PastelBg ( string input, Color color ) : string

Returns a string wrapped in an ANSI background color code using the specified color.

PastelBg ( string input, ConsoleColor color ) : string

Returns a string wrapped in an ANSI background color code using the specified color.

PastelBg ( string input, string hexColor ) : string

Returns a string wrapped in an ANSI background color code using the specified color.

Приватные методы

Метод Описание
CloseNestedPastelStrings ( string input, Color color, ColorPlane colorPlane ) : string
ConsoleExtensions ( ) : System
GetConsoleMode ( IntPtr hConsoleHandle, uint &lpMode ) : bool
GetStdHandle ( int nStdHandle ) : IntPtr
SetConsoleMode ( IntPtr hConsoleHandle, uint dwMode ) : bool

Описание методов

Disable() публичный статический Метод

Disables any future console color output produced by Pastel.
public static Disable ( ) : void
Результат void

Enable() публичный статический Метод

Enables any future console color output produced by Pastel.
public static Enable ( ) : void
Результат void

FromColor() публичный статический Метод

Convert a ConsoleColor to a Color.
public static FromColor ( ConsoleColor c ) : Color
c ConsoleColor
Результат Color

Pastel() публичный статический Метод

Returns a string wrapped in an ANSI foreground color code using the specified color.
public static Pastel ( string input, Color color ) : string
input string The string to color.
color Color The color to use on the specified string.
Результат string

Pastel() публичный статический Метод

Returns a string wrapped in an ANSI foreground color code using the specified color.
public static Pastel ( string input, ConsoleColor color ) : string
input string The string to color.
color ConsoleColor The color to use on the specified string.
Результат string

Pastel() публичный статический Метод

Returns a string wrapped in an ANSI foreground color code using the specified color.
public static Pastel ( string input, string hexColor ) : string
input string The string to color.
hexColor string The color to use on the specified string.Supported format: [#]RRGGBB.
Результат string

PastelBg() публичный статический Метод

Returns a string wrapped in an ANSI background color code using the specified color.
public static PastelBg ( string input, Color color ) : string
input string The string to color.
color Color The color to use on the specified string.
Результат string

PastelBg() публичный статический Метод

Returns a string wrapped in an ANSI background color code using the specified color.
public static PastelBg ( string input, ConsoleColor color ) : string
input string The string to color.
color ConsoleColor The color to use on the specified string.
Результат string

PastelBg() публичный статический Метод

Returns a string wrapped in an ANSI background color code using the specified color.
public static PastelBg ( string input, string hexColor ) : string
input string The string to color.
hexColor string The color to use on the specified string.Supported format: [#]RRGGBB.
Результат string