Farben is a terminal styling library for Rust that uses markup syntax. Color your terminal without typing whatever the heck \x1b[31m is.
use farben::prelude::*;
cprintln!("[bold red]Error:[/] something went wrong.");- Markup-like Syntax: Easy to read, easy to write.
- Zero Required Runtime Dependencies: Only path dependencies.
- Opt-in Compile-time Processing: Validate and process markup at compile time via the
compilefeature. - 8 Color Formats: Named, ANSI256, RGB, HSL, HSV/HSB, HWB, Lab, LCH, OKLCh, hex.
- 11 Emphasis Styles: Bold, dim, italic, underline, double-underline, blink, rapid-blink, reverse, invisible, strikethrough, overline.
- Inline Syntax:
*bold*,/italic/,`code`,~strikethrough~,_underline_via theinlinefeature. - Bleed Variants: Skip trailing reset for chained output.
- User-defined Styles:
style!()andprefix!()for custom tags. - anstyle Interop: Convert to/from
anstyle::Style.
- User Guide: https://razkar-studio.github.io/farben
- API Reference: https://docs.rs/farben
- Changelog: CHANGELOG.md or on the guide site
This workspace contains crates under different licenses.
The main Farben crate is licensed under the Mozilla Public License 2.0.
In short:
- You may use this crate commercially and privately.
- You may modify and redistribute it.
- If you modify MPL-covered source files and distribute them, those modified files must remain available under MPL-2.0.
- Your larger project does not need to be open source.
All farben-* internal crates are licensed under either of
at your option.
In short:
- You may use, modify, redistribute, and sublicense them freely.
- They may be used in open-source or proprietary projects.
- Apache-2.0 additionally provides explicit patent protections.
See the corresponding LICENSE-* files for details.
Cheers, RazkarStudio.
Copyright (c) 2026 RazkarStudio. All rights reserved.