[][src]Function winconsole::console::write_output_colors

pub fn write_output_colors(
    colors: &[(ConsoleColor, ConsoleColor)],
    column: u16,
    row: u16
) -> WinResult<u32>

Changes the output colors starting at a specified position, and returns the number of cells which were written to.

Arguments

Examples

Writes colors to the console starting at <0, 0>.

let colors = vec![
   (ConsoleColor::Red, ConsoleColor::Blue),
   (ConsoleColor::Blue, ConsoleColor::Red),
   (ConsoleColor::Red, ConsoleColor::Blue),
   (ConsoleColor::Blue, ConsoleColor::Red)
];
console::write_output_colors(&colors, 0, 0).unwrap();

Errors