From 3078eedb24897837770661595bca2e09a0f36dd2 Mon Sep 17 00:00:00 2001 From: Dylan Hurd Date: Mon, 19 Jan 2026 23:58:44 -0800 Subject: [PATCH] fix(tui) fix user message light mode background (#9407) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Fixes the user message styles for light mode. ## Testing Attaching 2 screenshots from ghostty, but I also tried various styles in Terminal.app and iTerm2. **Before** Screenshot 2026-01-16 at 5 22 36 PM **After** Screenshot 2026-01-16 at 5 22 59 PM --- codex-rs/tui/src/style.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/codex-rs/tui/src/style.rs b/codex-rs/tui/src/style.rs index e50d59791..26a71bd89 100644 --- a/codex-rs/tui/src/style.rs +++ b/codex-rs/tui/src/style.rs @@ -19,10 +19,10 @@ pub fn user_message_style_for(terminal_bg: Option<(u8, u8, u8)>) -> Style { #[allow(clippy::disallowed_methods)] pub fn user_message_bg(terminal_bg: (u8, u8, u8)) -> Color { - let top = if is_light(terminal_bg) { - (0, 0, 0) + let (top, alpha) = if is_light(terminal_bg) { + ((0, 0, 0), 0.04) } else { - (255, 255, 255) + ((255, 255, 255), 0.12) }; - best_color(blend(top, terminal_bg, 0.1)) + best_color(blend(top, terminal_bg, alpha)) }