GitShow/fatih/color
fatih

color

Color package for Go (golang)

by fatih
ansicolorcoloringgogolang
Star on GitHubForkWebsite

Go

8.0k stars648 forks43 contributorsActive · 1w agoSince 2014v1.19.0MIT

Meet the team

See all 43 on GitHub →
fatih
fatih201 contributions
dependabot[bot]Bot
dependabot[bot]38 contributions
gregpoirson
gregpoirson7 contributions
pellared
pellared4 contributions
n10v
n10v3 contributions
sashamelentyev
sashamelentyev2 contributions
bl-ue
bl-ue2 contributions
zddhub
zddhub2 contributions

Languages

View on GitHub →
Go100%

Commit activity

Last 12 weeks · 7 commits

Full graph →

Community health

2 of 6 standards met

Community profile →
42
✓README✓License○Contributing○Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Active · Last activity 1w ago
See all on GitHub →
team-humaki
color: close SGR when EnableColor overrides NoColorOpenPR

Set() honors EnableColor() even when the global NoColor autodetection is on, but unset() still called Unset(), which checks the global flag and skipped the reset. Escape sequences were opened and never closed. Write the reset from unset() using the same isNoColorSet() decision as Set(). SetWriter/UnsetWriter were already symmetric. Fixes #230

team-humaki · 6d ago
ryanchou1994
fix: include escape codes in Print byte countsOpenPR

and currently return only the content byte count, even though color-enabled calls also write an SGR prefix and reset to . Errors from those control-sequence writes are also discarded. Delegate both helpers to the existing / implementations so they follow the byte-count and first-error-stop behavior established in #282. This also fixes the instance-level path that could emit a prefix without its reset when the global value was true. The added tests cover the complete output and returned byte count for both helpers, plus propagation of a prefix write error without continuing to content or reset writes. Tests:

ryanchou1994 · 6d ago
lulunac27a
Fix commentsOpenPR

Fix comments with grammar fixes

lulunac27a · 2w ago

Recent fixes

View closed PRs →
Solaris-star
feat: add RemoveColor to strip ANSI SGR sequencesMergedPR

Summary Adds to strip ANSI SGR sequences from a string. Useful when colored output is later measured or written to non-TTY sinks (for example ), covering the request in #271. Tests Fixes #271

Solaris-star · 1mo ago
Structured data for AI agents

Repository: fatih/color. Description: Color package for Go (golang) Stars: 7997, Forks: 648. Primary language: Go. Languages: Go (100%). License: MIT. Homepage: https://pkg.go.dev/github.com/fatih/color Topics: ansi, color, coloring, go, golang. Latest release: v1.19.0 (6mo ago). Open PRs: 15, open issues: 19. Last activity: 1w ago. Community health: 42%. Top contributors: fatih, dependabot[bot], gregpoirson, pellared, n10v, sashamelentyev, bl-ue, zddhub, ataypamart, pattmax00 and others.

·@ofershap

Replace github.com with gitshow.dev