Skip to content

fix(styles): use ANSI palette colors so text is readable on light terminals#43

Merged
cloudmanic merged 1 commit into
cloudmanic:mainfrom
jkrperson:fix/light-theme-contrast
Jul 22, 2026
Merged

fix(styles): use ANSI palette colors so text is readable on light terminals#43
cloudmanic merged 1 commit into
cloudmanic:mainfrom
jkrperson:fix/light-theme-contrast

Conversation

@jkrperson

@jkrperson jkrperson commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Fixes #40

Summary

Quick Actions and Projects text is nearly invisible on light terminal themes. This switches foregrounds that render against the terminal background from dark-theme hex values to ANSI palette colors (or the terminal's default foreground), so both UIs stay readable on light and dark themes.

The Problem

The shared palette in styles.go (and the Projects styles in projectsmodel.go) hardcodes foregrounds chosen for dark terminals — #E5E7EB for list items, #FFFFFF for the selected row, grays for muted text. On a light background these have almost no contrast (see #40).

The Solution

  • List items and body text use the terminal's default foreground; the selected row is distinguished by bold + the selection bar.
  • Violet accents → ANSI 5/13 (magenta), muted text → 8, fuzzy-match highlights → 3, links → 6 — these track whatever palette the user's terminal defines.
  • titleStyle (the purple title chip) keeps its hex pair since it sets both foreground and background and is self-contained.

One tradeoff: exact accent shades now follow the user's 16-color palette rather than the fixed violet, so the dark-theme look can shift slightly depending on the palette.

Before / After

(light terminal theme, Quick Actions inside herdr)

Before After
before after

Testing

go build, go vet, go test -race ./... pass on macOS. Verified visually in a light-themed terminal inside herdr.

…minals

Foregrounds that render against the terminal background were fixed hex
values chosen for dark terminals (#E5E7EB, #FFFFFF, #6B7280, ...), which
made list items nearly invisible on light color schemes. Switch those to
ANSI palette colors or the terminal default foreground so they follow the
user's own theme. titleStyle keeps its hex pair since it sets both
foreground and background.

Fixes cloudmanic#40
@jkrperson
jkrperson marked this pull request as ready for review July 19, 2026 07:18

@cloudmanic cloudmanic left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, @jkrperson — this is the right fix. Using the terminal's default foreground for body text and ANSI palette colors for the accents is exactly how this should adapt across themes, and I appreciate you keeping the title chip as a self-contained fg/bg pair. The before/after made it easy to evaluate. Approving.

I'm knowingly taking the tradeoff that accent shades now follow the user's 16-color palette rather than the fixed violet — readability everywhere is worth more than the exact brand shade, and the title bar keeps it regardless. Thanks for taking care of #40.

@cloudmanic
cloudmanic merged commit 97e99ce into cloudmanic:main Jul 22, 2026
2 checks passed
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.

[Bug] Low contrast text when terminal uses a light color scheme

2 participants