Skip to content

Changelog

core0.13.4 / macros0.6.0 / frb0.18.0 / build0.1.4Global
Compile-time Runtime Detection2026-04-20
Added
  • strip_markup(input: &str) -> String in farben-core::strip: strips farben markup tags from a string, returning plain text. Re-exported from farben as farben::strip_markup.
  • markup_strip! macro that behaves the same as ansi_strip! but uses strip_markup
  • render_forced(tokens: Vec<Token>) -> String in farben-core::parser: renders tokens to ANSI unconditionally, bypassing color_enabled(). Used internally by color! and colorb! to ensure the styled variant is always baked in regardless of the build environment.
  • FarbenStr in farben: a compile-time string pair holding both a styled and plain &'static str variant. Resolved at the end user's runtime via FarbenStr::resolve() and Display.
  • color_enabled() re-exported from farben: previously only accessible via farben_core directly.
  • Doc comments in init_styles() of farben_build.
Changed
  • color! and colorb! now emit a FarbenStr instead of a bare &'static str, baking both ANSI and plain variants into the binary and deferring NO_COLOR/FORCE_COLOR/TTY detection to the end user's runtime.
  • render() now delegates its ANSI rendering path to render_forced().
  • The FORCE_COLOR build-time hack in color! and colorb! has been removed.
Breaking
  • color! and colorb! no longer return &'static str. Code storing the result directly as &str must call .resolve() explicitly. Usage inside cprintln!, cprint!, cwrite!, and all other print/write macros is unaffected.
  • Migration guides are in the repo's CHANGELOG.
build0.1.3farben-build
2026-04-19
Added
  • core module, exposing some library internals for users that want to use them
  • Documentation
core0.13.3 / frb0.17.3Global
LexError::display2026-04-18
Added
  • LexError::display(input) in farben-core — returns a LexErrorDisplay wrapper that formats the error with a caret pointing at the offending byte in the original input. Previously, this caret-style diagnostic was only available through the panic path in farben's macros; graceful callers of try_color could only access the plain one-line Display impl. The new method exposes the rich diagnostic to Result-based error handling.
Changed
  • farben-core dependency in farben bumped to core0.13.3.
core0.13.2 / frb0.17.2 / build0.1.2Global
Bleed Persistence & Build Hygiene2026-04-18
Added
  • active_stack(), set_active_stack(), and clear_active_stack() in farben-core — public API for managing the thread-local persisted style stack across render() calls.
  • farben-build now emits cargo:rerun-if-changed directives for each config file path, so edits to .frb.toml files correctly invalidate cached builds without requiring cargo clean.
Fixed
  • Bleed-style prints (cprintb!, cprintbln!) now correctly preserve the active style stack across calls. Previously, render() reset its internal stack between invocations, so a targeted reset like [/red] after a bleed call would emit a full reset and silently drop other active styles like bold. The stack is now persisted per-thread via thread_local!, resumed at the start of each render(), and cleared by color_runtime() after non-bleed prints append their trailing reset.
  • farben-build generated code now uses Rust's Debug formatter to embed style and prefix names, properly escaping quotes, backslashes, and control characters. Previously, names containing special characters could produce invalid Rust in the generated file.
farben-core 0.13.1 / farben-macros 0.5.2 / farben-build 0.1.1 / farben-md 0.2.2 / farben 0.17.1Global
DOCUMENTED!2026-04-18
Added
  • Comprehensive docstrings for all public items across the workspace!
Fixed
  • Fixed bugs
farben-core 0.13.0 / farben 0.17.0Global
Expand Macro & New SGR Tags2026-04-18
Added
  • EmphasisType::Overline (SGR 53), EmphasisType::Invisible (SGR 8), EmphasisType::Reverse (SGR 7), EmphasisType::RapidBlink (SGR 6), EmphasisType::DoubleUnderline (SGR 21) — new emphasis variants with corresponding [overline], [invisible], [reverse], [rapid-blink], [double-underline] tags.
  • debug module in farben-coretokens_to_markup(tokens) reconstructs a farben markup string from a parsed token slice, collapsing consecutive tags into a single bracket.
  • expand!(markup) in farben — diagnostic macro that prints three lines to stderr: the raw input, the fully expanded markup (registry styles resolved to their constituent tags), and the rendered ANSI escape string.
Changed
  • farben-core dependency in farben bumped to 0.13.0.
farben-core 0.12.1 / farben 0.16.3Global
Bug Fix2026-04-18
Fixed
  • tokenize no longer misinterprets \x1b[ (CSI ANSI escape sequences) as tag openers. The byte preceding each [ is checked; if it is ESC (0x1b), the character is treated as plain text and the loop continues. Previously, strings containing raw ANSI codes passed to color() or try_color() would erroneously return LexError::UnclosedTag.
farben 0.16.2farben
Style to ANSI2026-04-13
Added
  • farben::core module - exposes style_to_ansi() function for converting farben::Style into ANSI escape sequences.
farben 0.16.1farben
Bug Fixes2026-04-13
Fixed
  • anstyle! macro no longer requires farben_core crate as a direct dependency for users, the macro now uses farben::Style instead.
  • Tests no longer fail in non-TTY environments, the parser now respects the FORCE_COLOR environment variable in all tests.
farben-core 0.12.0 / farben 0.16.0Global
anstyle Interop2026-04-12
Added
  • anstyle feature flag - enables interoperability with the anstyle crate.
  • anstyle_conv module in farben-core - provides bidirectional From implementations for converting between farben types (Color, NamedColor, Style) and anstyle types (anstyle::Color, anstyle::AnsiColor, anstyle::Style).
  • anstyle! macro in farben - parses farben markup and converts the result into an anstyle::Style. Requires the anstyle feature flag.
  • anstyle crate added as an optional dependency to both farben-core and farben.
farben-core 0.11.0 / farben 0.15.0Global
Performance Optimizations2026-04-12
Added
  • ~1.4x faster on average across the core pipeline (geometric mean of 7 benchmarks vs v0.14). ANSI encoding sees the largest gains: named color encoding is 1.9x faster, RGB encoding 1.7x faster, emphasis sequences 1.6x faster. The full tokenize-to-render pipeline is 1.35x faster.
  • Breaking (farben-core 0.11.0): TagType::Reset(Option<Box<TagType>>) split into TagType::ResetAll (was Reset(None)) and TagType::ResetOne(Box<TagType>) (was Reset(Some(...))). Update all match arms that pattern-match on TagType::Reset.
  • Breaking (farben-core 0.11.0): Token::Text(String) is now Token::Text(Cow<'static, str>). Use Cow::Owned(string) for runtime strings or Cow::Borrowed("literal") for static literals. Pattern-matching and push_str usage are unaffected.
  • Criterion benchmark suite added to farben-core/benches/farben_bench.rs covering tokenize, render, full pipeline, emphasis_to_ansi, color_to_ansi (named and RGB), and registry lookup.
  • Tests for render with color disabled: verifies tag tokens are stripped and only text and prefix content is emitted.
  • Edge case tests for strip_ansi: empty string, bare ESC byte, sequences-only input, mixed content, RGB and ANSI256 sequences.
  • Release profile: lto = "thin", codegen-units = 1, opt-level = 3 in root Cargo.toml for cross-crate inlining in release builds.
  • Reduced allocations across the hot path: token Vec pre-allocated, render buffer pre-sized, emphasis_to_ansi and color_to_ansi bypass intermediate Vec<u8>, registry lookups clone an Arc instead of a full Style.
  • Redundant prefix scans in parse_part consolidated to a single strip_prefix per tag type.
  • env.rs unsafe blocks annotated with // SAFETY: comments.
  • Performance vs v0.14 (criterion 0.5.1, x86-64 Linux): tokenize plain -22%, tokenize complex -26%, pipeline -26%, emphasis_to_ansi -37%, color_to_ansi named -47%, color_to_ansi RGB -43%, registry lookup -5%, render -2% (within noise).
farben-build 0.1.0 / farben-macros 0.5.0 / farben-core 0.10.0 / farben-md 0.2.0 / farben 0.14.0Global
Compile-time Custom Style Support2026-04-05
Added
  • farben-build 0.1.0 - a new build script helper crate. Call farben_build::run() from build.rs to read farben.frb.toml and generate two artifacts in OUT_DIR: farben_styles.rs (a Rust source file containing an init_styles() function that registers all styles and prefixes at runtime via load_styles!()) and farben_registry.lsv (a line-separated values file consumed by farben-macros proc macros at compile time). Use farben_build::run_with(&[paths]) to supply custom config file paths instead of the default. Config files use a TOML format with [styles] and [prefixes] sections. Namespaced sections like [styles.myns] produce keys of the form myns:key.
  • Absolutely zero external dependencies added.
Changed
  • farben-macros bumped to 0.5.0. Every proc macro invocation now calls load_registry() at startup, which reads farben_registry.lsv from OUT_DIR and pre-populates the compile-time registry. As a result, color!, colorb!, and validate_color! now resolve user-defined style tags (e.g. [myTag]) that were declared in a .frb.toml config file.
  • farben-core bumped to 0.10.0. No new public API.
  • farben-md bumped to 0.2.0, picking up the farben-core 0.10.0 dependency. No new public API.
0.9.0farben-core
2026-04-04
Added
  • Lossy degrading. When the terminal does not support 24-bit true color, RGB values are automatically degraded to the nearest ANSI256 color. When the terminal only supports basic ANSI colors (8/16 colors), RGB and ANSI256 values are degraded to the nearest named color. The degrader module uses the COLORTERM and TERM environment variables to detect terminal color capabilities at runtime.
0.13.0farben
2026-04-04
Changed
  • farben-core dependency bumped to 0.9.0, picking up lossy degrading support.
0.12.0farben
2026-04-04
Added
  • cwrite!, cwriteln!, cwriteb!, cwritebln! - writer variants of the colored print macros. Work with any Write implementor. Useful for writing to files, String buffers, or custom writers. All four support the same markup features as the stdout variants (named colors, RGB, ANSI256, emphasis, bleeding via the b variants).
0.8.0farben-core
2026-04-04
Added
  • RegistryError enum - a separate error type for registry operations (set_prefix, insert_style). Split out from LexError because registry errors have no source position (they occur outside markup parsing). Has one variant: UnknownStyle(String).
  • LexErrorDisplay<'a> struct - wraps a &LexError and the original &str input to produce compiler-style diagnostic output. Renders two lines: the full input string, then a caret (^) aligned to the byte offset of the error.
Changed
  • All LexError variants now carry a position: usize field (byte offset into the markup string). Affected variants: UnclosedTag, InvalidTag, UnclosedValue, InvalidArgumentCount, InvalidValue, InvalidResetTarget. Previously no variants stored position info.
  • LexError::UnknownStyle removed - registry errors now use RegistryError::UnknownStyle instead.
  • LexError's Display impl now includes position in every message (e.g. "invalid tag 'foo' at position 5").
0.11.0farben
2026-04-04
Added
  • farben::prelude module - the recommended import path going forward. use farben::prelude::* brings every user-facing item into scope (functions, macros, types) gated by the same feature flags as their definitions. Prefer this over use farben::*, which also pulls in color_runtime and validate_color - items that are pub only to satisfy macro expansion, not intended for direct use.
Changed
  • farben-core dependency bumped to 0.8.0, picking up position-aware LexError variants and the new LexErrorDisplay diagnostic formatter. try_color error messages now include the byte offset of the offending token.
  • All documentation and examples updated to use use farben::prelude::*.
0.10.0farben
2026-04-04
Added
  • ansi_strip!(...) macro that accepts format!-style arguments, builds the string, then strips all CSI ANSI escape sequences from the result. Non-CSI ESC bytes pass through unchanged. Returns String.
  • strip_ansi re-exported at the farben crate root from farben-core::strip::strip_ansi. Available via use farben::*.
Changed
  • farben-core dependency bumped to 0.7.0.
0.7.0farben-core
2026-04-04
Added
  • env module: runtime detection of whether ANSI color output should be enabled. Respects NO_COLOR and FORCE_COLOR environment variable conventions, then falls back to TTY detection. Result is computed once per process and cached via OnceLock. TTY detection via isatty(1) on Unix, GetConsoleMode on Windows, false elsewhere.
  • strip module: strip_ansi(input) removes CSI ANSI escape sequences (ESC [ ... <letter>) from a string and returns plain text. Non-CSI ESC bytes are passed through unchanged.
  • Zero dependencies added to core library internals.
0.9.0farben
2026-03-20
Added
  • ceprint!, ceprintln!, ceprintb!, ceprintbln!, stderr variants of the colored print macros.
  • mdeprint!, mdeprintln!, stderr variants of the inline markdown print macros.
  • Empty invocation support for all print macros. cprintln!() now prints a bare newline, cprint!() prints nothing. Applies to ceprint!, ceprintln!, mdprint!, mdprintln!, mdeprint!, and all bleed variants.
Changed
  • src/lib.rs split into focused modules: functions.rs, macros/color.rs, macros/format.rs, macros/markdown.rs, macros/eprint.rs, and tests.rs. No public API changes.
0.8.3farben
2026-03-20
Fixed
  • prefix! macro no longer required users to manually add farben-core as a dependency. The set_prefix function is now re-exported through farben and the macro expands via farben::set_prefix.
  • color_fmt!, cprint!, cprintln!, cprintb!, and cprintbln! (compile feature) no longer require farben-macros as a direct dependency. validate_color is now re-exported through farben
0.1.2farben-md
2026-03-17
Fixed
  • Unclosed delimiters (**, *, _, __, ~~) incorrectly produced styled tokens instead of falling back to plain text. tokenize_inner return type changed from Vec<MdToken> to (Vec<MdToken>, bool) to distinguish a found closing delimiter from end-of-input exhaustion.
  • Added tokens_to_text helper to reconstruct plain text from partially parsed token trees when a closing delimiter is never found.
Added
  • Full unit test suite for lexer.rs and renderer.rs covering plain text, all six token types, nesting, unclosed delimiters, empty input, mixed content, and consecutive spans.
0.8.1 / 0.6.3 / 0.4.1 / 0.1.1Global
License Update2026-03-17
Changed
  • Changed LICENSE to MIT/Apache-2.0
0.1.0farben-md
2026-03-17
Added
  • tokenize() - parses inline markdown into a recursive MdToken tree. Supports **bold**, *italic*, _italic_, __underline__, ~~strikethrough~~, and `inline code`. Unclosed delimiters are treated as plain text.
  • render() - converts an MdToken tree into an ANSI-escaped string. Nested spans are handled via an active style stack that re-emits surviving styles after each reset.
  • MdToken - recursive token enum. Text(String) and Code(String) are leaf nodes; Bold, Italic, Underline, and Strikethrough carry Vec<MdToken>.
0.4.0farben-macros
2026-03-17
Added
  • markdown!() - proc macro that parses and renders inline markdown at compile time, emitting the final ANSI-escaped string baked into the binary. Enabled via the markdown feature.
0.8.0farben
2026-03-17
Added
  • markdown() - runtime function that parses and renders inline markdown into an ANSI-escaped string. Always succeeds. Enabled via the markdown feature.
  • md_fmt!() - renders inline markdown with format arguments. Always runtime. Enabled via the markdown feature.
  • mdprint!() - prints inline markdown to stdout without a newline. Runtime under markdown, compile-time under markdown-compile.
  • mdprintln!() - prints inline markdown to stdout with a trailing newline. Runtime under markdown, compile-time under markdown-compile.
  • markdown feature - enables runtime markdown rendering via farben-md.
  • markdown-compile feature - enables both markdown and compile with compile-time rendering via farben-macros.
Changed
  • style!() and prefix!() macros moved from farben-core to farben, under the format feature flag.
0.8.0 / 0.4.0 / 0.1.0Global
Markdown Update2026-03-17
Added
  • farben-md - new crate providing inline markdown tokenization and ANSI rendering. Depends on farben-core for ANSI encoding.
  • color_to_ansi() and emphasis_to_ansi() made public in farben-core 0.6.2, enabling farben-md to delegate ANSI encoding without reimplementing it.
0.6.2farben-core
2026-03-17
Changed
  • Made style_to_ansi() and emphasis_to_ansi() public functions.
0.7.1farben
2026-03-16
Added
  • style!() - moved from farben-core. Defines a named style in the global registry. Gated behind the format feature.
  • prefix!() - moved from farben-core. Sets a prefix string on a previously defined named style. Gated behind the format feature.
0.6.1farben-core
2026-03-16
Changed
  • style!() - moved to farben. Users importing directly from farben-core should update to farben::style!().
  • prefix!() - moved to farben. Users importing directly from farben-core should update to farben::prefix!().
0.3.1farben-macros
2026-03-16
Changed
  • Minor dependency update to farben-core.
0.3.0farben-macros
2026-03-16
Changed
  • colorb! - replaced one-line stub doc 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. Doc comment now explicitly marks it as internal and directs users toward color! and color_fmt!.
0.7.0farben
2026-03-16
Added
  • colorb - added missing doc comment explaining bleed behavior and when to use it over color.
  • color_fmt! (compile-time variant) - added missing doc comment. Previously the runtime variant was documented but the compile-feature counterpart had none.
Changed
  • Crate-level doc comment revised: fixed grammar and capitalized "German".
Fixed
  • cprint! (compile-time variant) - example referenced unbound variable message. Added declaration so it compiles as a doctest.
  • cprintln! (compile-time variant) - example referenced unbound variable result. Added declaration so it compiles as a doctest.
  • test_try_color_inline_reset - strengthened assertion to a full equality check against the expected output "\x1b[31mbefore\x1b[0mafter\x1b[0m".
0.6.0farben-core
2026-03-16
Added
  • LexError::InvalidResetTarget - returned when a reset tag targets something that cannot be reset (e.g. [//] or [/prefix]). Previously caused a panic.
  • LexError::UnknownStyle - returned by registry::set_prefix when the given style name has not been registered.
  • registry::set_prefix now returns Result<(), LexError> instead of (), allowing callers to handle unknown style names without panicking.
Changed
  • ansi::style_to_ansi promoted from pub(crate) to pub. Users building on top of farben-core can now call it directly.
  • ansi::style_to_ansi - removed #[allow(unused)] now that it is part of the public API.
  • registry::prefix! macro updated to call .expect() on the Result returned by set_prefix, preserving panic-on-misuse at the macro callsite.
  • LexError::InvalidArgumentCount display improved from "expected N, got M" to "expected N arguments, got M".
Fixed
  • lexer::parse_part - replaced panic! with Err(LexError::InvalidResetTarget) when a reset tag targets a Reset or Prefix node.
  • registry::set_prefix - replaced panic! with Err(LexError::UnknownStyle) when the style name is not found in the registry.
  • errors.rs - corrected typo in UnclosedValue display: "parantheses" → "parentheses".
  • ansi::NamedColor doc comment - corrected "eight standard ANSI named colors" to "sixteen ANSI named colors".
  • ansi::style_to_ansi - added a working doctest demonstrating bold + named color output.
  • parser::render - removed unnecessary .as_str() calls on String return values.
0.6.0farben-core (cascade)
2026-03-16
Added
  • Specified resets - [/bold], [/red], [/italic] etc. reset only the named style, leaving all other active styles intact.
  • TagType::Reset now takes Option<Box<TagType>> - None for full reset [/], Some(tag) for partial reset.
  • parser::render now maintains an active tag stack, re-emitting surviving styles after a partial reset.
Changed
  • TagType::Reset changed from a unit variant to Reset(Option<Box<TagType>>).
  • All existing [/] full reset behavior is preserved via Reset(None).
Fixed
  • Fixed a bug where colorb!() did not exist when using the compile feature.
0.2.6farben / farben-macros
2026-03-16
Changed
  • Minor dependency update to farben-core.
0.5.1farben
2026-03-16
Changed
  • Minor dependency update to farben-core.
0.2.5farben-macros
2026-03-15
Changed
  • Minor dependency update to farben-core.
0.4.2farben-core
2026-03-15
Added
  • Bright ANSI color variants (bright-black through bright-white).
0.5.0farben-core (cascade)
2026-03-15
Added
  • Added bugs.
  • Style::prefix field - optional text prepended before the style's ANSI codes when applied.
  • TagType::Prefix(String) variant - carries prefix text through the token pipeline to the renderer.
  • set_prefix() - sets the prefix on an existing registry entry, panics if the style is not found.
  • prefix!() macro - user-facing API for binding a text prefix to a named style.
  • style_to_tags() now emits TagType::Prefix as the first tag when a prefix is present.
  • parser::render() now handles TagType::Prefix by appending the text directly to output.
  • format default feature - gates logic for style!() and prefix!().
Changed
  • style_to_tags() no longer returns early on reset when a prefix is present; prefix is always emitted first.
  • style!() is now gated to the format feature.
0.4.1farben-core
2026-03-15
Fixed
  • Bug where prefix!() interfered with actual color styling.
0.2.4farben-macros
2026-03-15
Changed
  • Minor dependency update to farben-core.
0.2.3farben-macros
2026-03-15
Changed
  • Minor dependency update to farben-core.
0.4.0farben-core (cascade)
Public Farben Update2026-03-15
Added
  • Style::parse() - builds a Style from a farben markup string.
  • Style::reset field - when true, overrides all other style attributes with a full SGR reset.
  • registry module - global style registry backed by OnceLock<Mutex<HashMap<String, Style>>>.
  • insert_style() - inserts a named style into the global registry.
  • search_registry() - looks up a named style from the global registry.
  • style!() macro - user-facing API for defining custom named styles.
  • style_to_tags() - converts a Style into a Vec<TagType> for lexer expansion.
  • Custom tag resolution in parse_part() - unknown tags now check the registry before returning InvalidTag.
  • parse_part() return type changed from Result<TagType, LexError> to Result<Vec<TagType>, LexError> to support style expansion.
  • colorb!() bleeds at compile-time with the colorb() runtime counterpart.
Changed
  • parse_tag() updated to flatten nested Vec<TagType> results from parse_part().
  • All functions using compile can now benefit from compile-time processing instead of just validation.
Fixed
  • color!() now auto-resets.
0.2.2farben-macros
2026-03-15
Added
  • Dependency update to farben-core.
  • colorb!() macro that bleeds.
Fixed
  • color!() now auto-resets.
0.3.0farben-core
2026-03-15
Added
  • Style::parse() - builds a Style from a farben markup string.
  • Style::reset field - when true, overrides all other style attributes with a full SGR reset.
  • registry module - global style registry backed by OnceLock<Mutex<HashMap<String, Style>>>.
  • insert_style() - inserts a named style into the global registry.
  • search_registry() - looks up a named style from the global registry.
  • style!() macro - user-facing API for defining custom named styles.
  • style_to_tags() - converts a Style into a Vec<TagType> for lexer expansion.
  • Custom tag resolution in parse_part() - unknown tags now check the registry before returning InvalidTag.
  • parse_part() return type changed from Result<TagType, LexError> to Result<Vec<TagType>, LexError> to support style expansion.
Changed
  • parse_tag() updated to flatten nested Vec<TagType> results from parse_part().
0.3.3farben
2026-03-14
Added
  • cprintb! and cprintbln! for color-bleeding printing.
0.2.1farben-macros
2026-03-14
Added
  • 100% documentation coverage.
0.2.1farben-core
2026-03-14
Added
  • 100% documentation coverage.
0.3.2farben
2026-03-14
Added
  • cprint!() - prints farben-colored markup to stdout without a newline, behaves like print!.
  • cprintln!() - prints farben-colored markup to stdout with a trailing newline, behaves like println!.
  • Both macros support format args and compile-time validation when the compile feature is enabled.
0.3.0farben
2026-03-14
Added
  • color!() - compile-time markup processing via optional compile feature flag.
  • color_fmt!() - format args support with compile-time tag validation when compile is enabled.
  • validate_color!() - proc-macro that validates farben markup at compile time.
  • color_runtime() - internal runtime fallback used by color_fmt!.
  • bg: and fg: prefix support in color tags - [bg:red], [fg:white bg:blue].
  • farben-core and farben-macros as separate workspace crates.
  • compile feature flag for opt-in compile-time processing.
Changed
  • Internal logic moved to farben-core.
  • color() replaced by color! proc-macro when compile feature is enabled.
0.2.0farben-core
2026-03-14
Added
  • bg: and fg: prefix support for color tags.
  • Ground field added to TagType::Color variant.
  • Background color support in encode_color_sgr and color_to_ansi.
  • New tests for background color parsing, tokenizing, and rendering.
Changed
  • TagType::Color(Color) restructured to TagType::Color { color: Color, ground: Ground }.
0.2.0farben-core (cascade)
2026-03-14
Added
  • color!() - compile-time markup processing via optional compile feature flag.
  • color_fmt!() - format args support with compile-time tag validation.
  • validate_color!() - proc-macro that validates farben markup at compile time, emitting the original string literal unchanged on success.
  • color_runtime() - internal runtime fallback used by color_fmt!.
  • farben-core - extracted shared logic crate containing lexer, parser, ANSI encoding, and error types.
  • farben-macros - proc-macro crate powering compile-time processing.
  • Cargo workspace setup with farben, farben-core, and farben-macros as members.
  • compile feature flag - opt-in compile-time processing via farben-macros.
Changed
  • color() is now replaced by the color! proc-macro when the compile feature is enabled.
  • Internal logic extracted from farben into farben-core for shared use across crates.
0.1.0farben-core (cascade)
2026-03-14
Added
  • color() - colorizes a string using markup-like syntax, panics on invalid markup.
  • try_color() - same as color() but returns Result<String, LexError>.
  • Named color tags: [black], [red], [green], [yellow], [blue], [magenta], [cyan], [white].
  • 256-color palette support via [ansi(n)].
  • 24-bit RGB support via [rgb(r,g,b)].
  • Emphasis tags: [bold], [dim], [italic], [underline], [blink], [strikethrough].
  • Multi-tag brackets: [bold red], [italic rgb(255,0,0)].
  • Reset tag [/] to clear all active styles.
  • Escape sequence \[ to treat [ as a literal character.
  • LexError with variants UnclosedTag, InvalidTag, InvalidValue, InvalidArgumentCount.
  • Foreground and background color support via Ground enum.
  • Automatic reset appended to all color() and try_color() output.