Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Rust
  3. colored

colored

MPL-2.0Rustv3.1.1

A simple Rust library for coloring terminal output with an intuitive API and support for true colors.

GitHubGitHub
2.0k stars95 forks0 contributors

What is colored?

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.

Target Audience

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.

Value Proposition

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.

Overview

(Rust) Coloring terminal so simple you already know how to do it !

Use Cases

Best For

  • Adding colored status messages (e.g., success in green, errors in red) to CLI tools.
  • Building terminal-based applications that require rich text formatting with styles like bold, italic, or underline.
  • Creating cross-platform command-line utilities that respect NO_COLOR and CLICOLOR environment variables for accessibility.
  • Implementing true color support in terminal output for modern terminals that support arbitrary RGB values.
  • Developing Rust projects where compile-time disabling of colors is needed, such as in testing environments.
  • Simplifying terminal output styling with a fluent API that avoids complex ANSI escape code handling.

Not Ideal For

  • Applications requiring low-level ANSI escape code manipulation for custom terminal behaviors beyond coloring.
  • Projects deployed in headless environments without terminal emulation (e.g., server logs with no TTY).
  • Teams needing permissive licensing without copyleft requirements, as MPL2.0 mandates sharing modifications.

Pros & Cons

Pros

Intuitive Fluent API

Allows method chaining like '.blue().bold()' directly on strings, making coloring straightforward as shown in the extensive example code.

True Color Support

Supports arbitrary RGB values with .truecolor() method for modern terminals, enabling rich color customization without limitations.

Environment Awareness

Respects CLICOLOR, CLICOLOR_FORCE, and NO_COLOR variables automatically, ensuring cross-platform compatibility and user accessibility preferences.

Cross-Platform Compatibility

Works on Linux, macOS, and Windows including PowerShell, as explicitly stated in the README, reducing portability issues.

Cons

Terminal Dependency

True color support requires terminal compatibility (COLORTERM set), and the library lacks detailed fallback mechanisms for unsupported terminals, which can lead to inconsistent output.

License Constraints

MPL2.0 license requires sharing modifications to the library code, which may be restrictive for proprietary projects or teams avoiding copyleft.

Limited Advanced Features

Focuses solely on basic coloring and styles; lacks support for terminal UI elements, cursor control, or animations, making it unsuitable for complex interactive apps.

Frequently Asked Questions

Quick Stats

Stars2,023
Forks95
Contributors0
Open Issues38
Last commit4 months ago
CreatedSince 2016

Tags

#formatting#hacktoberfest#styling#colors#crates#terminal#truecolor#ansi-escape-codes#color#cli#cross-platform#rust

Built With

R
Rust

Included in

Rust56.6k
Auto-fetched 22 hours ago

Related Projects

ratatui-org/ratatuiratatui-org/ratatui

A Rust crate for cooking up terminal user interfaces (TUIs) 👨‍🍳🐀 https://ratatui.rs

Stars20,940
Forks680
Last commit1 day ago
clap-rsclap-rs

A full featured, fast Command Line Argument Parser for Rust

Stars16,458
Forks1,195
Last commit7 days ago
indicatifindicatif

A command line progress reporting library for Rust

Stars5,158
Forks277
Last commit5 days ago
CursiveCursive

A Text User Interface library for the Rust programming language

Stars4,805
Forks263
Last commit1 month ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub