Expand description

Utilities for interacting with a terminal.

The most common use for this package is to style a string to output to the terminal.

use dinglebit_terminal::style;
fn main() {
    let s = style!("{}, {}!", "Hello", "world")
    assert_eq!(s, "\x1b[30;4mHello, world!\x1b[0m");

You can apply foreground and background colors as well as various attributes like bold, itlic, underline, etc.


Constants as defined in ANSI escape code.

Escape Sequence for the terminal.

Apply a style to terminal text using the “Set Graphics Mode” escape sequence.


Create a reset escape sequence for the graphics mode.

Create a SetGraphicsMode using the given vector.

format! the given values and create a Style that can then be used to style the text.