copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

[Bug] Text selection highlight has very low contrast on dark terminal backgrounds

Open dezgit2025 opened this issue 8 months ago • 6 comments

Describe the bug

When selecting/highlighting text in the Copilot CLI terminal output, the selection background color (dark purple/indigo) is nearly indistinguishable from the dark terminal background. This makes it very difficult to read selected text or even see what is currently selected.

The issue appears in the default dark theme. Both the code block content and regular response text become almost invisible when highlighted.

Screenshot

The selection highlight (dark purple) against the dark gray background makes text nearly unreadable:

  • White text on dark background → becomes dark blue/purple text on slightly lighter purple background
  • Syntax-highlighted words (green, cyan) → become almost invisible against the purple selection
  • Overall: insufficient contrast ratio between selection background and both the text foreground and the terminal background

Affected version

GitHub Copilot CLI 1.0.10

Environment

  • OS: macOS (Darwin)
  • Terminal: VS Code integrated terminal
  • Theme: Default dark

Steps to reproduce

  1. Start a Copilot CLI session in VS Code terminal (dark theme)
  2. Ask Copilot to output some text (e.g. a code block or paragraph)
  3. Click and drag to select/highlight the output text
  4. Observe that the selection background color has very low contrast — selected text is nearly invisible

Expected behavior

Selected/highlighted text should remain clearly readable. The selection background color should provide sufficient contrast against both the text foreground colors and the terminal background. A lighter highlight color (e.g., a medium blue or lighter purple) would significantly improve readability.

Suggested fix

Consider using a selection background with higher contrast — for example:

  • Lighter purple/blue (#5A4FCF or similar) instead of the current near-black purple
  • Or respect the terminal emulator's native selection colors rather than overriding them

Related issues

  • #2180 — selection background color off after theme switch (related but different root cause)
  • #1847 — code diffs hard to see in dark mode
  • #1818 — diff highlight colors broken
  • #2123 — feature request for fine-grained per-element theming

dezgit2025 avatar Mar 22 '26 19:03 dezgit2025

I'm seeing the same thing on v1.0.11 and now v1.0.12. Annoyingly Copilot itself is suggesting changing my iTerm2 settings to fix it but nothing has changed with my terminal settings. Using /theme high-contrast doesn't improve things.

This makes it slightly more usable: NO_COLOR=1 TERM=xterm-256color copilot

matt448 avatar Mar 27 '26 20:03 matt448

This is what a highlighted line looks like with the default Copilot theme:

Image

This is the high-contrast theme

Image

and for reference this is my same terminal at a zsh prompt

Image

matt448 avatar Mar 27 '26 20:03 matt448

I have the same issue as well. It's so hard to tell what text has been selected (at least on my monitor):

Image

Could we customize the CLI's theme maybe, somehow? To be able to change that color into something with more contrast?

Antzelino avatar Mar 31 '26 11:03 Antzelino

I asked Copilot if it was possible to customize existing themes or create new ones and it said no:

based on current Copilot CLI docs there isn’t support for creating fully custom user-defined themes yet.

matt448 avatar Apr 01 '26 14:04 matt448

Can't select text with Shift+ Left/Right in input... Please fix that too.

fantasyz avatar Apr 07 '26 17:04 fantasyz

This appears to be resolved as of GitHub Copilot CLI v1.0.88. Please update to that release or a newer stable version. We're closing this as completed. If it still happens, please comment with your version and reproduction steps.

copilot-cli-bot[bot] avatar Sep 28 '26 10:09 copilot-cli-bot[bot]