colorful-console 0.3.0

A simple way to get colored text in the console!
Documentation
  • Coverage
  • 22.22%
    6 out of 27 items documented2 out of 9 items with examples
  • Size
  • Source code size: 21.58 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.59 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 17s Average build duration of successful builds.
  • all releases: 17s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Sietse2202

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();
}