Skip to content

fix(cli): legible output on light/white terminal backgrounds#457

Merged
blainekasten merged 2 commits into
mainfrom
blaine/eng-91023-fix-cli-output-legibility-when-used-on-a-white-background
Jul 21, 2026
Merged

fix(cli): legible output on light/white terminal backgrounds#457
blainekasten merged 2 commits into
mainfrom
blaine/eng-91023-fix-cli-output-legibility-when-used-on-a-white-background

Conversation

@blainekasten

@blainekasten blainekasten commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

CLI help and other Rich-styled output used a dark-terminal palette (#caaef5 + ANSI dim / white). On white backgrounds that reads as near-invisible gray.

Changes

  • Dual Rich themes (light / dark) in _console.py
  • Auto-select via:
    1. TG_THEME or TOGETHER_CLI_THEME (light | dark)
    2. COLORFGBG (bg ≥ 7 → light)
    3. default dark
  • Light theme (high contrast):
    • body text (secondary / muted / dim) → near-black (#111827 / #1f2937)
    • brand accent (primary) → bold violet-900 #4c1d95 (~11:1 on white)
    • [white]#000000
    • all body styles assert WCAG AAA (≥7:1) on white
  • Dark theme: keep the existing palette; drop dim from secondary
  • Help formatter: descriptions / defaults use muted
  • Questionary prompt styles follow the active theme
  • Unit tests for theme resolution and light-theme contrast

Verify

TG_THEME=light tg beta models --help
TG_THEME=dark tg beta models --help
# or rely on COLORFGBG from the terminal

Test plan

  • pytest tests/cli/test_console_theme.py
  • pytest tests/cli/test_main.py tests/cli/test_beta_models.py
  • Manual: light terminal — confirm Commands / Options / Examples are readable
  • Manual: dark terminal — confirm look is unchanged aside from slightly stronger secondary text
Open in Web Open in Cursor 

Add light/dark Rich themes selected via TG_THEME/TOGETHER_CLI_THEME or
COLORFGBG. Light theme uses darker brand tones and overrides dim/white so
help text, examples, and pagination stay readable on white backgrounds.

Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
@broly-code-security-scanner

Copy link
Copy Markdown

Broly Security Scan

Note

Clean scan
No vulnerabilities detected in this PR.

Note

Re-scan this PR anytime with /broly scan — useful after /broly undismiss, or to refresh findings without a new push.

Broly — SAST (zai-org/GLM-5.2) · Secrets · SCA · GH Actions (zizmor) · Containers · SBOM · Powered by Together AI

@blainekasten
blainekasten marked this pull request as ready for review July 21, 2026 20:34
Push light-theme body styles to near-black, darken brand purple to violet-900,
bold primary accents, and assert WCAG AAA contrast on white.

Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
@blainekasten
blainekasten force-pushed the blaine/eng-91023-fix-cli-output-legibility-when-used-on-a-white-background branch from 310d8e5 to 5090342 Compare July 21, 2026 20:36
@blainekasten
blainekasten merged commit 5da1f1b into main Jul 21, 2026
12 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 21, 2026
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.

3 participants