Skip to main content

Crate farben

Crate farben 

Source
Expand description

§Introduction

Farben (as in “color” in german) is a zero-dependency terminal coloring library. Farben uses a markup-language-like syntax to your string and outputs them colored. For example:

§Example

use farben::*;

let colored = color("[red]I'm red!");
assert_eq!(colored, "\x1b[31mI'm red!\x1b[0m");

Modules§

errors

Functions§

color
Parses and renders a farben markup string, appending a final SGR reset.
try_color
Parses and renders a farben markup string, appending a final SGR reset.