colorline

Crates.iocolorline
lib.rscolorline
version0.2.0
created_at2025-12-19 20:23:07.778293+00
updated_at2026-01-16 20:32:15.561058+00
descriptionText coloring in Rust for terminals. Minimal and easy to use.
homepage
repositoryhttps://github.com/Pjdur/colorline
max_upload_size
id1995456
size6,566
Pjdur (Pjdur)

documentation

README

colorline

Text coloring in Rust for terminals

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
Commit count: 8

cargo fmt