Crate colorful_console

Source
Expand description

A crate to make using colored text in the terminal easy

§Example

use colorful_console::*;

fn main() {
  console::log("Starting", Color::Reset);
  console::warn(&*format!("Could {} instantiate", color_wrap("not", Color::Red)), Color::Reset);
  console::error("Something went wrong, restarting soon", Color::Reset);
  clear_terminal();
}

Modules§

console

Enums§

Color

Traits§

LoggableResult

Functions§

clear_terminal
Clears the terminal screen
color_wrap
A function that puts the correct ascii-escape characters around a string so that the string is colored in the specified color.