colorful-console

Crates.iocolorful-console
lib.rscolorful-console
version0.3.0
sourcesrc
created_at2024-10-20 11:17:07.625511
updated_at2024-10-22 14:01:54.394631
descriptionA simple way to get colored text in the console!
homepage
repository
max_upload_size
id1416161
size22,063
Sietse (Sietse2202)

documentation

README

Colorful Console

A simple crate made to add a little bit of color to your basic terminal. Can be used to color your terminal, but is best used for making logging look both clean, but also convey enough information.

Example usage

use colorful_console::*; // Imports the crate

fn main() {
  // Prints "Starting" in the standard color (Color::Reset)
  console::log("Starting", Color::Reset);
  
  // Shows how to use the `color_wrap()` function 
  console::warn(&*format!("Could {} instantiate", color_wrap("not", Color::Red)), Color::Reset);
  
  console::error("Something went wrong, restarting soon", Color::Reset);
  
  // Clears the terminal screen
  clear_terminal();
}
Commit count: 0

cargo fmt