chroma-print 1.0.1

A lightweight utility for styled terminal printing using ANSI escape codes.
Documentation
  • Coverage
  • 65%
    13 out of 20 items documented1 out of 9 items with examples
  • Size
  • Source code size: 9.27 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.64 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 16s Average build duration of successful builds.
  • all releases: 13s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • brysonbw/chroma-print
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • brysonbw

ChromaPrint

A lightweight utility for styled terminal printing using ANSI escape codes.

Crates.io Crates.io CI

Install globally

cargo install chroma-print

Install as a library

cargo add chroma-print

Usage

use chroma_print::{ChromaPrint, print_error, print_info, print_success, print_warn};

fn main() {
    // Using the provided macros for convenient styled printing:
    print_success!("This is a success message!");
    print_info!("This is an info message!");
    print_warn!("This is a warning message!");
    print_error!("This is an error message!");

    // Alternatively, you can use the ChromaPrint struct directly:
    println!("{}", ChromaPrint::success("Success!"));
    println!("{}", ChromaPrint::info("Info!"));
    println!("{}", ChromaPrint::warn("Warning!"));
    eprintln!("{}", ChromaPrint::error("Error!"));
}

Contributing

If you have suggestions for how this project could be improved, or want to report a bug, feel free to open an issue! We welcome all contributions.

Likewise, before contributing please read and complete the contribution guide.

Resources

License

MIT