invisible text when using light theme: dark text over dark textarea
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_
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
i exit and reopen, the input area renders correct theme
Same on Windows. I measured it per-pixel so the numbers are concrete.
Environment
background #FDF6E3)AppsUseLightTheme = 1andSystemUsesLightTheme = 1— Windows is in light modeMeasured 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:
#657B83on#292929→ 3.27:1 (fails WCAG AA 4.5:1)#657B83on#FDF6E3→ 4.13:1 (everywhere else in the TUI)No terminal-side fix exists.
#292929is neither in the xterm-256 palette(235 =
#262626, 236 =#303030) nor in Solarized, so it is emitted as truecolorand cannot be remapped by the terminal. Changing the terminal foreground cannot work
either, because the two backgrounds sit at opposite ends:
#FDF6E3requires relative luminance L ≤ 0.166#292929requires L ≥ 0.275No single foreground colour satisfies both.
Tested and does not help
COLORFGBG=0;15— composer stays#292929, text unchangedcodex --no-alt-screen— same[tui] theme— appears to be syntect syntax themes only (the value list issyntect's bundled set, and the TUI event is
SyntaxThemeSelected); it does nottouch the composer
The only thing that works is
NO_COLOR=1, which removes the composer backgroundentirely 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--themeflag.Related: #18942, #21130, #27333, #2020 (closed), plus the duplicates the bot flagged
above: #14996, #15736, #16165.