Function crossterm::style::color[][src]

Important traits for Box<R>
pub fn color() -> Box<TerminalColor>

Get an TerminalColor implementation whereon color related actions can be performed.

Example

extern crate crossterm;

use self::crossterm::style::{color, Color};
 
// Get colored terminal instance
let mut colored_terminal = color();

// preform some actions on the colored terminal
colored_terminal.set_fg(Color::Red);
colored_terminal.set_bg(Color::Blue);
colored_terminal.reset();