<div align="center">
# farben-core
### The internal core library for [Farben](https://github.com/razkar-studio/farben)
[](https://crates.io/crates/farben)
[](https://docs.rs/farben)
[](https://github.com/razkar-studio/farben/blob/main/LICENSE)
[](https://crates.io/crates/farben)
[](https://github.com/razkar-studio/farben/stargazers)
[](https://github.com/razkar-studio/farben/issues)
[](https://github.com/razkar-studio/farben/commits/main)
[](https://doc.rust-lang.org/edition-guide/rust-2024/)
[](https://deps.rs/repo/github/razkar-studio/farben)
[](https://github.com/razkar-studio/farben)
[](https://github.com/razkar-studio/farben)
</div>
> [!WARNING]
> This crate is not intended for direct use. Its API is not stable and may change at any time without notice. Use the [`farben`](https://crates.io/crates/farben) crate instead.
## Contents
This crate contains the shared logic used by `farben` and `farben-macros`:
- **Lexer**: tokenizes farben markup strings into a `Vec<Token>`
- **Parser**: renders a token stream into an ANSI escape sequence string
- **ANSI**: color and emphasis encoding via SGR escape codes
- **Errors**: `LexError` and its variants
## License
Licensed under either of [MIT License](LICENSE-MIT) or [Apache License, Version 2.0](LICENSE-APACHE) at your option.
Cheers, RazkarStudio.
© 2026 RazkarStudio. All rights reserved.