From 1280c77163aa717da943760df5ebc537c2b5803c Mon Sep 17 00:00:00 2001 From: VyankateshA1 Date: Tue, 9 Jan 2024 15:42:21 +0530 Subject: [PATCH] fix the problem Cursor colour turns grayish black on turning on dark mode. #3738 --- .../main/java/com/termux/terminal/TerminalColorScheme.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/terminal-emulator/src/main/java/com/termux/terminal/TerminalColorScheme.java b/terminal-emulator/src/main/java/com/termux/terminal/TerminalColorScheme.java index 4088781805..0615662456 100644 --- a/terminal-emulator/src/main/java/com/termux/terminal/TerminalColorScheme.java +++ b/terminal-emulator/src/main/java/com/termux/terminal/TerminalColorScheme.java @@ -116,10 +116,11 @@ public void setCursorColorForBackground() { int backgroundColor = mDefaultColors[TextStyle.COLOR_INDEX_BACKGROUND]; int brightness = TerminalColors.getPerceivedBrightnessOfColor(backgroundColor); if (brightness > 0) { - if (brightness < 130) + if (brightness < 130){ mDefaultColors[TextStyle.COLOR_INDEX_CURSOR] = 0xffffffff; - else + } else{ mDefaultColors[TextStyle.COLOR_INDEX_CURSOR] = 0xff000000; + } } }