Repository navigation
Dusting
Changelog
All notable changes to Farben will be documented here.
[0.3.0] - 2026-03-16
Changed
colorb!— replaced one-line stub doc ("Same ascolor!, but bleeds.") with a full
doc comment explaining what bleed means, when to use it, and how it differs from
color!. Includes a working example.validate_color!— removed misleading user-facing example. The macro is internal
infrastructure used bycolor_fmt!,cprint!, andcprintln!; the example implied
direct use was intended. Doc comment now explicitly marks it as internal and directs
users towardcolor!andcolor_fmt!instead.
[0.7.0] - 2026-03-16 - farben
Added
colorb— added missing doc comment explaining bleed behavior and when to use it
overcolor.color_fmt!(compile-time variant) — added missing doc comment. Previously the
runtime variant was documented but thecompile-feature counterpart had none.
Changed
- Crate-level doc comment revised: fixed grammar ("uses a markup-language-like syntax
to your string" → "applies a markup-like syntax to your strings") and capitalized
"German".
Fixed
cprint!(compile-time variant) — example referenced unbound variablemessage.
Addedlet message = "I don't know";to the example so it compiles as a doctest.cprintln!(compile-time variant) — example referenced unbound variableresult.
Addedlet result = "We did it!";to the example so it compiles as a doctest.test_try_color_inline_reset— strengthened assertion from
s.contains("\x1b[0m")(always true due to trailing reset) to a full equality check
against the expected output"\x1b[31mbefore\x1b[0mafter\x1b[0m".
[0.6.0] - 2026-03-16 - farben-core
Added
LexError::InvalidResetTarget— new error variant returned when a reset tag targets
something that cannot be reset (e.g.[//]or[/prefix]). Previously caused a panic.LexError::UnknownStyle— new error variant returned byregistry::set_prefixwhen
the given style name has not been registered.registry::set_prefixnow returnsResult<(), LexError>instead of(), allowing
callers to handle unknown style names without panicking.
Changed
ansi::style_to_ansipromoted frompub(crate)topub. Users building on top of
farben-corecan now call it directly to convert aStyleinto a combined SGR sequence.ansi::style_to_ansi— removed#[allow(unused)]attribute now that the function is
part of the public API.registry::prefix!macro updated to call.expect()on theResultreturned by
set_prefix, preserving the existing panic-on-misuse behavior at the macro callsite
while keeping the underlying function non-panicking.LexError::InvalidArgumentCountdisplay message improved from
"expected N, got M"to"expected N arguments, got M"for clarity.
Fixed
lexer::parse_part— replacedpanic!withErr(LexError::InvalidResetTarget)when
a reset tag targets aResetorPrefixnode. User-supplied markup can no longer crash
the process through thetry_colorpath.registry::set_prefix— replacedpanic!withErr(LexError::UnknownStyle)when the
style name is not found in the registry.errors.rs— corrected typo inUnclosedValuedisplay message:
"parantheses" → "parentheses".ansi::NamedColordoc comment — corrected "eight standard ANSI named colors" to
"sixteen ANSI named colors" (eight standard + eight bright variants).ansi::style_to_ansi— added a working doctest demonstrating bold + named color output.parser::render— removed unnecessary.as_str()calls onStringreturn values from
color_to_ansiandemphasis_to_ansi;push_straccepts&strviaDerefdirectly.