[][src]Function term_basics_linux::set_colour

pub fn set_colour(col: UserColour, fgbg: FGBG)

Sets the colour of the text printed after this call. It will print linux colour escape characters to std out. It will set the state, so you can use restore_colour to get it back.

Examples

use term_basics_linux as tbl;
for i in tbl::UserColour::iterator(){
    tbl::set_colour(i.clone(), tbl::FGBG::FG);
    println!("haha yes");
}
use term_basics_linux as tbl;
for i in tbl::UserColour::iterator(){
    tbl::set_colour(i.clone(), tbl::FGBG::BG);
    println!("haha yes");
}