Skip to content

Commit

Permalink
fix the problem Cursor colour turns grayish black on turning on dark …
Browse files Browse the repository at this point in the history
…mode. termux#3738
  • Loading branch information
VyankateshA1 committed Jan 9, 2024
1 parent 8e3a898 commit 1280c77
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -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;
}
}
}

Expand Down

0 comments on commit 1280c77

Please sign in to comment.