[−][src]Function winconsole::console::map_color
pub fn map_color(color: ConsoleColor, rgb: RGB8) -> WinResult<()>
Maps a ConsoleColor
to an RGB8 value.
Arguments
color
- TheConsoleColor
to map.rgb
- The RGB color which theConsoleColor
should represent.
Examples
Maps ConsoleColor::Black
to white.
use rgb::RGB8; console::map_color(ConsoleColor::Black, RGB8 { r: 255, g: 255, b: 255 }).unwrap();
Errors
InvalidHandleError
: Returned if an invalid handle to the console output is retrieved or used.IoError
: Returned if an OS error occurs.