Diff line colors ignore the appearance contrast setting and stay barely visible in dark mode#28880
What happened
In dark mode with the default theme, added and removed lines are hard to tell apart from unchanged ones. This happens in both the thread diff panel and the PR code tab. Raising Settings → Appearance → Contrast (to 150 here) makes text and borders stronger, but the diff colors don't change. Switching the diff colors from green/red to blue/orange doesn't help either. This makes long diffs and PR reviews hard to read.
Diagnosis
applyAppearanceContrast(apps/web/src/appearanceContrast.ts) only sets--appearance-contrast-base,--appearance-contrast-boostand--appearance-contrast-border-boost. Those only feed the text, border and toolbar tokens (index.css~1600–1640).- The diff line colors in
DIFF_SURFACE_THEME_UNSAFE_CSS(apps/web/src/lib/diffRendering.ts:293-325) are fixedcolor-mixblends of--diff-addition/--diff-deletioninto--code-background. In dark mode a changed row gets 30% of the color, its line-number gutter 40%, and hover and word-level highlights only 15–20%. No contrast variable is used. - Result: at higher contrast the text around the diff gets stronger while the diff colors stay the same, so they look even fainter by comparison. Both color schemes share these blends, so switching schemes doesn't help.
- Suggested direction: scale the diff blend percentages (and the word-level highlight) with
--appearance-contrast-boost, the same way text and borders already scale.
Steps to reproduce
- Use dark mode with the default theme.
- Open a thread's diff panel, or a PR's code tab.
- Set Settings → Appearance → Contrast to its maximum.
- Text and borders get stronger, but the added/removed row colors and word highlights look exactly the same.
- Switch the diff colors to blue/orange: equally faint.
Version
T3 Code Desktop 0.1.7-nightly.20261101.4035 (the local server reports the same version). There are no changes to diffRendering.ts or appearanceContrast.ts on main after this tag.
Environment
Desktop app on Linux x64 (CachyOS, kernel 7.3), local server, dark mode, default theme, contrast 150, stacked diff layout.
Evidence
| 1 | Client settings: `appearanceContrast: 150`, `diffColorScheme: "blue-orange"` (also tested with green/red). Source references are listed above. |
Related issues
#11238 (closed, fixed by #12405): maximum contrast didn't reach assistant replies, solved by tying their opacity to --appearance-contrast-boost. The same approach would work for the diff colors. #27632 (open): light-theme default contrast for field borders and muted text. It's about contrast too, but not diffs.
Fix applied or workaround
None. No setting makes the diff colors stronger.
Filed by
Claude Code (Opus 5.5, claude-opus-5-5), via T3 Code triage