From 157f070fafaefb3dcc7152b3defa20e627c0abbe Mon Sep 17 00:00:00 2001 From: passivestar <60579014+passivestar@users.noreply.github.com> Date: Sat, 24 Jan 2026 02:30:23 +0400 Subject: [PATCH] Fix colors of code editor in modern theme --- editor/themes/editor_theme_manager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/themes/editor_theme_manager.cpp b/editor/themes/editor_theme_manager.cpp index c44527475bd..2f035d6b1ab 100644 --- a/editor/themes/editor_theme_manager.cpp +++ b/editor/themes/editor_theme_manager.cpp @@ -509,8 +509,8 @@ void EditorThemeManager::_populate_text_editor_styles(const Ref &p_ colors["text_editor/theme/highlighting/string_placeholder_color"] = p_config.dark_icon_and_font ? Color(1, 0.75, 0.4) : Color(0.93, 0.6, 0.33); // Use the brightest background color on a light theme (which generally uses a negative contrast rate). - colors["text_editor/theme/highlighting/background_color"] = p_config.dark_icon_and_font ? p_config.dark_color_2 : p_config.dark_color_3; - colors["text_editor/theme/highlighting/completion_background_color"] = p_config.dark_icon_and_font ? p_config.base_color : p_config.dark_color_2; + colors["text_editor/theme/highlighting/background_color"] = p_config.base_color.lerp(Color(0, 0, 0), p_config.contrast * (p_config.dark_icon_and_font ? 1.2 : 1.8)).clamp(); + colors["text_editor/theme/highlighting/completion_background_color"] = p_config.base_color.lerp(Color(0, 0, 0), p_config.contrast * 0.3).clamp(); colors["text_editor/theme/highlighting/completion_selected_color"] = alpha1; colors["text_editor/theme/highlighting/completion_existing_color"] = alpha2; // Same opacity as the scroll grabber editor icon.