-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Open
Labels
TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displayIssues related to the terminal user interface: text input, menus and dialogs, and terminal displayenhancementNew feature or requestNew feature or request
Description
Problem
Codex CLI hard-codes colours optimised for dark backgrounds, making prompts, completions and menus almost invisible when the terminal uses a light background. Users must either invert their entire terminal theme, or forego Codex altogether. That clashes with Codex’s goal of “runs in your terminal” and hurts day-to-day usability.
Impact
- Accessibility – developers who rely on light themes for reduced eye-strain or colour-vision requirements cannot read the interface.
- Adoption – teams with enforced light corporate themes (common in financial and healthcare environments) simply skip Codex.
- Consistency – every major TUI framework (ratatui, rich, xterm.js) ships both dark and light palettes. Codex is the outlier.
Proposal
-
Theme selection
- Add
theme = "light" | "dark"in~/.codex/config.{json,toml}(default to auto-detect via$COLORFGBG,$TERM_PROGRAM_BACKGROUND, or Windows registry). - Expose
--themeflag for quick overrides.
- Add
-
Palette definition
- Replace hard-coded ANSI names with semantic tokens (e.g.
primary,accent,error). - Provide two JSON/TOML palettes shipped in the repo; load at startup.
- Replace hard-coded ANSI names with semantic tokens (e.g.
-
Auto-test
- CI job renders the TUI in both palettes and checks contrast ratios ≥ 4.5 : 1 (WCAG AA).
-
Migration
- Keep existing colours as the “dark” palette; no breaking changes.
Prior art
- Ink Select component already uses an internal theming object – this can be extended.
- Ratatui examples show palette switching in < 20 LOC; no heavy refactor needed.
Acceptance criteria
- All UI elements (input box, slash-command menu, status bar, onboarding screens) render legibly on a white background.
codex --theme lightworks without touching global terminal settings.- Documentation updated in Configuration section.
Links
- Earlier feature request: Control over color theme in TUI #1618
Codex already delights on dark screens; adding a light theme would make it universal, accessible and ready for every workflow.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displayIssues related to the terminal user interface: text input, menus and dialogs, and terminal displayenhancementNew feature or requestNew feature or request