colorline 0.2.0

Text coloring in Rust for terminals. Minimal and easy to use.
Documentation
  • Coverage
  • 81.82%
    9 out of 11 items documented1 out of 10 items with examples
  • Size
  • Source code size: 6.08 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.3 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 15s Average build duration of successful builds.
  • all releases: 16s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Pjdur/colorline
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Pjdur

About

Colorline provides a simple trait for Rust strings, letting you call methods like .red() or .blue() directly.
It is designed to stay minimal and easy to use.

Supported colors:

  • Red
  • Green
  • Yellow
  • Blue
  • Magenta
  • Cyan
  • Grey

Example

use colorline::Style;

fn main() {
    println!("{}", "Error".red());
    println!("{}", "Success".green());
    println!("{}", "Note".cyan());
}

Why

There are already crates for coloring text in Rust, like colored, which is similar to colorline.
Colorline exists because I wanted something smaller and simpler:

  • Just a few basic colors and bold text
  • No extra features or complexity
  • An API that feels clean and easy to use