You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Text selection has poor contrast/readability on light terminals with certain themes #5295
When selecting text (mouse drag to copy) in the TUI on a light terminal, the selection highlighting has poor contrast making the selected text difficult or impossible to read. This affects the default opencode theme, as well as orng and likely others.
The root cause is that @opentui/core defaults to inverting foreground/background colors when no explicit selection colors are provided. This works well for dark themes (light text → light selection background with dark text), but produces poor results for light themes or themes with dark text colors (dark text → dark selection background with black/transparent foreground).
OpenCode version
1.0.137
Steps to reproduce
Use a light terminal theme (or terminal with light background)
Run opencode with the default opencode theme (also reproducible with orng and others)
Have the AI generate a response with some text
Try to select text by clicking and dragging to copy it
Notice the selection is hard to read due to poor contrast
System theme #4427: System theme (regressed selection visibility in 1.0.69)
These issues also report contrast and readability problems with text selection highlighting in the TUI when using certain themes, particularly with light terminals or transparent backgrounds. Feel free to ignore if your specific case differs from these reports.
I had checked #4669 and #4666 noted above by github-actions bot but those seem to be about (slash) command highlighting rather than selecting text on the scrollback buffer components.
Activity
github-actions commentedon Dec 9, 2025
This issue might be a duplicate of existing issues. Please check:
These issues also report contrast and readability problems with text selection highlighting in the TUI when using certain themes, particularly with light terminals or transparent backgrounds. Feel free to ignore if your specific case differs from these reports.
ben-vargas commentedon Dec 9, 2025
I had checked #4669 and #4666 noted above by github-actions bot but those seem to be about (slash) command highlighting rather than selecting text on the scrollback buffer components.
kommander commentedon Dec 20, 2025
It needs to set proper text selection fg/bg colors and add these to the theme, as by default it currently just inverses the colors.