Repository navigation
Description
Summary
The desktop app renders chat/assistant text near-white for dark themes, ignoring the selected theme's text color. With "One Dark" selected the text is #f8f9fa on #1b1e25 (measured ~16:1 contrast), while the theme itself (and the TUI / theme tool preview) use #abb2bf on #282c34 (~6.6:1). The result is much harsher than the theme intends, and there is no setting or workaround in the desktop app to reduce it.
Environment
- opencode version:
opencode v2.0.24(bundled CLI); desktop app@opencode/desktop2.0.24 - OS: Windows 11 (10.0.26200.9457), x64
- Terminal: N/A — using the OpenCode desktop app (Electron), not the terminal TUI
- Shell:
C:\Windows\system32\cmd.exe - Install/channel: release/latest; installed under
%LOCALAPPDATA%\Programs\@opencodedesktop; auto-update channellatest - Active plugins: none in the global config; the project used during testing has two local plugins in
.opencode/plugins/unrelated to theming or rendering
Reproduction
- Open the OpenCode desktop app 2.0.24 → Settings → Appearance → Theme: "One Dark" (Color scheme: dark).
- Open any session that has assistant text.
- Observe the message text color and background.
Measured from a screenshot: text #f8f9fa, background #1b1e25.
Expected Behavior
Chat text should use the theme's own text color — for One Dark #abb2bf on #282c34 (~6.6:1), matching the TUI and the theme tool preview at https://opencode.ai/theme/#one-dark. At minimum, there should be a way to control text contrast.
Actual Behavior
Chat text renders #f8f9fa on #1b1e25 (~16:1) — much brighter than the theme defines. The theme's text color never reaches the chat view. Switching themes does not help (see below), and the desktop app does not read custom themes from ~/.config/opencode/themes/, so the issue cannot be worked around with a theme file.
Additional Context
Theme intent, from the bundled definition (app.asar → out/renderer/assets/one-dark-TozNBRZD.js):
- dark palette:
neutral: "#282c34",ink: "#abb2bf" - overrides include
"markdown-text": "#abb2bf"
What the app actually generates (persisted in localStorage under opencode-theme-css-dark):
--v2-text-text-base: #f8f9fa--text-base: #bac1cf,--text-strong: #f8f9fa--background-weak: #1b1e25,--background-base: #161920
Chat markdown is styled with [data-component=markdown] { color: var(--v2-text-text-base) }, so the v2 token wins and the theme's markdown-text / text-base value is never used.
The default "OpenCode" (oc-2) theme maps v2-text-text-base to var(--v2-grey-100) = #fafafa in dark mode, so other dark themes are affected in the same way.
Requested change (any of these would resolve it):
- derive
--v2-text-text-basefrom the theme's text/ink color, or fall back to the theme'smarkdown-text/text-baseoverrides; - and/or add a contrast setting;
- and/or support custom themes in the desktop app.
Workarounds tried: switching themes (no improvement — base text is near-white for other dark themes too); switching color scheme to light (not desired); placing a modified theme in ~/.config/opencode/themes/ (desktop ignores it). The issue is always reproducible. The terminal TUI and the theme tool preview render One Dark with the correct, softer colors.
Activity
github-actions commentedon Oct 6, 2026
This issue might be a duplicate of existing issues. Please check:
opencodejr commentedon Oct 27, 2026
Thanks for the detailed report and the measurements!
What you're seeing is how the desktop theme mapping is currently designed, not a bug. In dark mode the desktop app builds its main text colour (
--v2-text-text-base) by mixing the theme's text colour with mostly white (seepackages/ui/src/theme/v2/foreground.ts), so the chat text comes out near-white for every dark theme. The chat view uses that colour, not the theme'smarkdown-text.So this is a request for the desktop app to follow the theme's own text colour more closely (as the TUI and the theme preview do). You suggested three ways to get there: derive the base text colour from the theme's text colour or
markdown-text, add a contrast setting, or load custom themes from~/.config/opencode/themes/. I've marked it as a feature request for the maintainers to consider. This kind of theming can't currently be changed through an OpenCode plugin, so I can't offer a plugin workaround.