Skip to content

Desktop: theme switch does not apply text color in chat panel — text always stays white #42030

Closed as not planned

Description

@Cossack13

Description

In the OpenCode desktop app (Windows), switching the design theme does not apply the selected theme's colors to regular text in the chat panel. Code blocks and diff panels update correctly, and list markers change color, but plain text and accent blocks (class member names, identifiers) remain white regardless of the selected theme.

This may be the root cause behind several related readability issues — the chat text color is effectively hardcoded white rather than following the theme. For example:

Switching theme changes the background, so when a light background combines with always-white text, the text becomes invisible. The fix should ensure the chat panel text color follows the active theme.

Additionally, there are two UX issues with the theme selector dropdown itself:

  1. After selecting a theme, focus is lost — arrow keys cannot be used to quickly cycle through themes and compare them.
  2. After manually switching themes 4–5 times, the dropdown stops opening. Closing and reopening the Settings window fixes the dropdown, but arrow key navigation is never available.

Plugins

"@tarquinen/opencode-dcp@latest", "opencode-wakatime", "opencode-vibeguard", "@franlol/opencode-md-table-formatter@latest", "@mohak34/opencode-notifier@latest"

OpenCode version

OpenCode Desktop v1.18.16

Steps to reproduce

  1. Open OpenCode desktop app on Windows.
  2. Go to Settings → Appearance.
  3. Select any design theme from the dropdown.
  4. Observe: code blocks and diff panels change color, but chat text stays white.
  5. Try using arrow keys to cycle themes — focus is lost after selection.
  6. Switch themes manually 4–5 times — the dropdown stops opening.

Screenshot and/or share link

Image Image Image

Operating System

Windows 11 Pro, 25H2, 26200.8875

Terminal

Not applicable; OpenCode Desktop

Activity

  1. TurboBinCN commented on Oct 7, 2026

    @TurboBinCN

    Confirmed on Linux desktop (Electron, current stable). I think the root cause is narrower than "chat text color is hardcoded white" — there are two variable systems in the shipped bundle, and the chat panel reads the one the theme switch does not feed.

    A/B on the live window (counting visible text leaf nodes — must restrict to visible leaves, otherwise HEAD/SCRIPT/STYLE inflate the count):

    variable set on :root visible text nodes that change
    --text-base 0 / 100
    --text-strong 0 / 100
    --markdown-text 0 / 100
    --v2-text-text-base 81 / 100

    So chat body text is driven by --v2-text-text-base, not --text-base (the name looks right but is inert). That matches the symptom exactly: code blocks, diff panels and list markers follow the theme because they use the --text-* set, while plain text keeps reading the separately generated --v2-* set — which for vesper starts from editor.foreground: #FFF regardless of the selected theme.

    What I would suggest for the official fix:

    1. Generate --v2-text-text-base from the active theme's foreground instead of hardcoding it. That alone makes the chat panel follow the theme like the rest of the UI already does.
    2. If a user override is wanted, store it separately from the generated table (e.g. settings.themeOverrides: { "--v2-text-text-base": "#A5AAB3" }) and apply it after the table is generated. Right now theme application regenerates the whole table from the packaged theme and unconditionally overwrites localStorage['opencode-theme-css-dark'], so any user edit is lost on the next switch and on restart — which is why a runtime-only workaround has to replay after load rather than just write localStorage once.

    (There is no user-facing colour setting today; #10423 covers font size/zoom only.)

  2. thdxr commented on Oct 11, 2026

    @thdxr
    Member

    Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

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