C# Class Colorful.ColorMapper

Exposes methods used for mapping System.Drawing.Colors to System.ConsoleColors. Based on code that was originally written by Alex Shvedov, and that was then modified by MercuryP.
Show file Open project: tomakita/Colorful.Console Class Usage Examples

Public Methods

Method Description
MapColor ( ConsoleColor oldColor, Color newColor ) : void

Maps a System.Drawing.Color to a System.ConsoleColor.

Private Methods

Method Description
GetConsoleScreenBufferInfoEx ( IntPtr hConsoleOutput, CONSOLE_SCREEN_BUFFER_INFO_EX &csbe ) : bool
GetStdHandle ( int nStdHandle ) : IntPtr
MapColor ( ConsoleColor color, uint r, uint g, uint b ) : void
SetConsoleScreenBufferInfoEx ( IntPtr hConsoleOutput, CONSOLE_SCREEN_BUFFER_INFO_EX &csbe ) : bool

Method Details

MapColor() public method

Maps a System.Drawing.Color to a System.ConsoleColor.
public MapColor ( ConsoleColor oldColor, Color newColor ) : void
oldColor ConsoleColor The color to be replaced.
newColor Color The color to be mapped.
return void