fatih/color

Color package for Go (golang)

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 18 seconds ago
Added to GitGenius on September 8th, 2026
Created on February 17th, 2014
Open Issues & Pull Requests: 32 (+0)
GitHub issues: Enabled
Number of forks: 646
Total Stargazers: 7,999 (+0)
Total Subscribers: 49 (+0)

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Issue API getrepoissuespagesummary failed: 429 Rate limit exceeded. Please try again later.

Detailed Description

Color is a Go package for adding ANSI color codes to terminal output with support for Windows environments.

The package solves the problem of producing colorized text in command-line applications by providing a straightforward API for applying colors to strings. It works by wrapping ANSI escape codes, which are the standard mechanism for terminal color control. The package automatically detects whether the output stream supports colors—disabling them for piped output or non-terminal streams—and respects the NO_COLOR environment variable convention. It also allows programmatic control to enable or disable colors globally or per-color definition, useful for CLI applications with color flags.

Developers should choose this tool for any Go CLI or terminal application that needs colored output. It suits projects ranging from simple scripts to complex command-line tools. The package offers multiple API styles to match different coding preferences: standard color functions, RGB color support for 24-bit terminals, color mixing and reuse, custom output writers, and integration with existing code through print function wrappers. For CI environments like GitHub Actions that support ANSI colors, the package can be configured to output colors despite non-tty detection.

The project maintains active build automation through continuous integration workflows. The package has established itself as a stable, widely-adopted solution in the Go ecosystem with straightforward maintenance of its core functionality.