[][src]Function winconsole::console::read_output_colors

pub fn read_output_colors(
    column: u16,
    row: u16,
    max_length: impl Into<Option<u32>>
) -> WinResult<Vec<(ConsoleColor, ConsoleColor)>>

Reads colors from the console output starting at a specified location, and returns a vector of tuples. The first item in each tuple is the foreground color, and the second is the background color.

Arguments

Examples

Prints the colors in the first cell.

let colors = console::read_output_colors(0, 0, 1).unwrap();
println!("{} {}", colors[0].0, colors[0].1);

Errors