A simple Rust library for coloring terminal output with an intuitive API and support for true colors.
Colored is a Rust library that provides an easy and intuitive way to add colors and styles to terminal output. It solves the problem of verbose or complex terminal text formatting by offering a fluent API that allows method chaining directly on strings, while respecting environment variables like NO_COLOR and CLICOLOR for cross-platform compatibility.
Rust developers building command-line applications, tools, or scripts that require enhanced terminal output with colors and styles, especially those prioritizing ease of use and cross-platform support.
Developers choose Colored for its intuitive fluent API that makes coloring as simple as calling .blue() or .bold() on strings, its robust support for true colors and environment variable awareness, and its minimal dependencies with compile-time control via feature flags.
(Rust) Coloring terminal so simple you already know how to do it !
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Allows method chaining like '.blue().bold()' directly on strings, making coloring straightforward as shown in the extensive example code.
Supports arbitrary RGB values with .truecolor() method for modern terminals, enabling rich color customization without limitations.
Respects CLICOLOR, CLICOLOR_FORCE, and NO_COLOR variables automatically, ensuring cross-platform compatibility and user accessibility preferences.
Works on Linux, macOS, and Windows including PowerShell, as explicitly stated in the README, reducing portability issues.
True color support requires terminal compatibility (COLORTERM set), and the library lacks detailed fallback mechanisms for unsupported terminals, which can lead to inconsistent output.
MPL2.0 license requires sharing modifications to the library code, which may be restrictive for proprietary projects or teams avoiding copyleft.
Focuses solely on basic coloring and styles; lacks support for terminal UI elements, cursor control, or animations, making it unsuitable for complex interactive apps.