[−][src]Function winconsole::console::set_color_mapping
pub fn set_color_mapping(mapping: &[RGB8; 16]) -> WinResult<()>
Sets the color mapping of the console.
The indices of the array correspond with ConsoleColor
values.
Arguments
mapping
- The color mapping to set.
Examples
use rgb::RGB8; let mut mapping = console::get_color_mapping().unwrap(); mapping[0] = RGB8 { r: 255, g: 255, b: 255 }; console::set_color_mapping(&mapping).unwrap();
Errors
InvalidHandleError
: Returned if an invalid handle to the console output is retrieved or used.IoError
: Returned if an OS error occurs.