Skip to main content

Crate rnk_style

Crate rnk_style 

Source
Expand description

§rnk-style

Standalone terminal styling library for Rust.

Style your terminal output without the full TUI framework.

§Example

use rnk_style::{Style, Color, BorderStyle};

let style = Style::new()
    .fg(Color::Cyan)
    .bold()
    .padding(1, 2)
    .border(BorderStyle::Round);

println!("{}", style.render("Hello, World!"));

Modules§

adaptive_colors
Convenience adaptive colors

Structs§

AdaptiveColor
Adaptive color that depends on terminal background
Style
Style for terminal text rendering

Enums§

BorderStyle
Border style
Color
Color type supporting various color formats

Functions§

detect_background
Detect terminal background from environment
init_background_detection
Initialize background detection
is_dark_background
Check if the terminal has a dark background
set_dark_background
Set whether the terminal has a dark background