Skip to content

desktop: chat text ignores theme color (One Dark renders #f8f9fa instead of #abb2bf) #53567

Open

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/desktop 2.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 channel latest
  • 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

  1. Open the OpenCode desktop app 2.0.24 → Settings → Appearance → Theme: "One Dark" (Color scheme: dark).
  2. Open any session that has assistant text.
  3. 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-base from the theme's text/ink color, or fall back to the theme's markdown-text / text-base overrides;
  • 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

  1. github-actions commented on Oct 6, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    • #42030: Desktop theme switching does not apply the selected text color to chat text, which stays white.
    • #41941: The selected design theme does not affect text color in the desktop chat window.
  2. opencodejr commented on Oct 27, 2026

    @opencodejr

    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 (see packages/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's markdown-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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions