Skip to content

fix: improve ANSI black/brightBlack contrast for readability#7

Merged
danfry1 merged 2 commits into
mainfrom
fix/ansi-black-contrast
Mar 29, 2026
Merged

fix: improve ANSI black/brightBlack contrast for readability#7
danfry1 merged 2 commits into
mainfrom
fix/ansi-black-contrast

Conversation

@danfry1
Copy link
Copy Markdown
Owner

@danfry1 danfry1 commented Mar 29, 2026

Summary

  • ANSI black and brightBlack were nearly invisible as foreground text against the base background (#12101e)
  • Updated both to readable values that stay in the purple-gray family:
    • black: #1e1a2c (1.11:1) → #56526c (~2.5:1)
    • brightBlack: #302c42 (1.4:1) → #68647e (~3.3:1)
  • Added ANSI contrast validation to prevent regression (black: 2:1 min, brightBlack: 3:1 min)
  • Regenerated all terminal/editor outputs

Closes #6

Test plan

  • All 20 tests pass (bun test)
  • Contrast validation passes (bun run generate)
  • Drift check passes (bun run check)
  • Visually confirmed in Ghostty terminal

danfry1 added 2 commits March 29, 2026 12:47
Adds minimum contrast checks against base background:
- ansi.black: 2:1 minimum
- ansi.brightBlack: 3:1 minimum

Palette currently fails — fixed in next commit.
black: #1e1a2c (1.11:1) → #4c4862 (~2.2:1)
brightBlack: #302c42 (1.4:1) → #68647e (~3.3:1)

Both were nearly invisible against the base background (#12101e).
New values stay in the purple-gray family while being legible.

Closes #6
@danfry1
Copy link
Copy Markdown
Owner Author

danfry1 commented Mar 29, 2026

Thanks @mesalilac for the detailed report and screenshots — great catch! The fix bumps both ANSI black values into readable range and adds contrast validation so this can't regress.

@danfry1 danfry1 merged commit 31e64c0 into main Mar 29, 2026
3 checks passed
@danfry1 danfry1 deleted the fix/ansi-black-contrast branch March 29, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

the black and bright black forground colors is almost invisible

1 participant