invisible text when using light theme: dark text over dark textarea

Open 💬 3 comments Opened Apr 1, 2026 by franchesoni
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

codex-cli 0.118.0

What subscription do you have?

plus

Which model were you using?

_No response_

What platform is your computer?

Linux 6.18.7-76061807-generic x86_64 x86_64

What terminal emulator and version are you using (if applicable)?

COSMIC Terminal

What issue are you seeing?

when i run codex on light theme i see the following

<img width="679" height="284" alt="Image" src="https://github.com/user-attachments/assets/6fd5b26d-7ebd-4097-9aa7-591b71bb32d5" />

<img width="728" height="512" alt="Image" src="https://github.com/user-attachments/assets/e4c0b95c-464a-4821-9503-a1fe03e7d00b" />

but in dark theme i see

<img width="728" height="512" alt="Image" src="https://github.com/user-attachments/assets/6dd70442-8b94-4796-b1e9-eb75d7a1bd36" />

which is correct.

In other words: light theme makes codex 1. use a dark background for the input area, 2. put a seemingly random white letter in that area, 3. display the suggested text and any text i write in dark as well, so i don't see it. That means I can only use codex with dark theme.

What steps can reproduce the bug?

Uploaded thread: 019d4818-6bc3-7753-92f4-12ff3f146a44

just run codex on light theme on pop-os COSMIC

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 4 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #14996
  • #15736
  • #16165

Powered by Codex Action

cynicalight · 4 months ago

i exit and reopen, the input area renders correct theme

cyhbench · 4 hours ago

Same on Windows. I measured it per-pixel so the numbers are concrete.

Environment

  • codex-cli 0.150.1, Windows 11 (10.0.26200), Windows Terminal
  • Color scheme: built-in Solarized Light (background #FDF6E3)
  • AppsUseLightTheme = 1 and SystemUsesLightTheme = 1 — Windows is in light mode

Measured from a screenshot

| | |
|---|---|
| Terminal background | #FDF6E3 |
| Composer background | #292929 |
| Composer text | #657B83 — the terminal's own default foreground |

Codex paints the composer background but leaves the text at the terminal's default
foreground, which is tuned for a light background. That is what makes it unreadable
rather than merely out of place.

Contrast ratios:

  • #657B83 on #292929 → 3.27:1 (fails WCAG AA 4.5:1)
  • #657B83 on #FDF6E3 → 4.13:1 (everywhere else in the TUI)

No terminal-side fix exists. #292929 is neither in the xterm-256 palette
(235 = #262626, 236 = #303030) nor in Solarized, so it is emitted as truecolor
and cannot be remapped by the terminal. Changing the terminal foreground cannot work
either, because the two backgrounds sit at opposite ends:

  • reaching 4.5:1 on #FDF6E3 requires relative luminance L ≤ 0.166
  • reaching 4.5:1 on #292929 requires L ≥ 0.275

No single foreground colour satisfies both.

Tested and does not help

  • COLORFGBG=0;15 — composer stays #292929, text unchanged
  • codex --no-alt-screen — same
  • [tui] theme — appears to be syntect syntax themes only (the value list is

syntect's bundled set, and the TUI event is SyntaxThemeSelected); it does not
touch the composer

  • Windows light mode is already on and is evidently not consulted

The only thing that works is NO_COLOR=1, which removes the composer background
entirely and makes the whole TUI readable — but it also disables diff and syntax
colours, so it is not usable day to day.

Ask: either honour the OS/terminal light mode on Windows the way macOS already
does (#18942 reports the light composer does render there after a restart), or expose
an explicit override such as [tui] theme_mode = "light" | "dark" or a --theme flag.

Related: #18942, #21130, #27333, #2020 (closed), plus the duplicates the bot flagged
above: #14996, #15736, #16165.