-
Notifications
You must be signed in to change notification settings - Fork 34
fix: Modify text colors for dark mode readability #510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
To facilitate the review, could you please post the before-after comparison? |
Added the before picture. (Note: the checkboxes are a separate PR I'll be adding shortly, so ignore them for now) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may have been intentional, but it's also incredibly difficult to read. Reading the blue is nearly impossible in some cases. Typically, text vs background should have a contrast ratio of at least 4.5:1. The blue alone is only 1.77:1. That said, in a lot of dark-mode schemes, text is just various shades of gray, and you utilize the background color for more "broad" information, especially when it's "just" text, and not things like headers, buttons, etc. |
|
I did like the old foreground color, but contrast is more important to me than the nice look, so i like the new option more. We can always go back to different foreground colors with better contrast later.
Yeah nice, my numbers where just a suggestion, my feel for colors is terrible overall :) |
There is some maths going on with the colors, that is why they are always in 'pairs' of 4. For example: yafc-ce/Yafc.UI/ImGui/ImGuiUtils.cs Line 121 in 26a7a00
(But there are more places) So simply changing the meaning of the 4 colors might have some side effects, if we are not careful and check all scenarios. I cannot remember the exact reasoning behind them anymore, too long ago... 😄 |
|
Looks like a good idea. I must confess I didn't really care for the dark mode colors back when I did the row highlighting. And yes, the strange color array thingamabob should really be refactored. I was to give it a try, but then RL happened. Feel free to give it a make over. |
I'll look into this as a separate PR. It might be part of some changes to the input system that I'm working on. (The current one is... "ok" at best) |
That was done so they look better in the UI.
e776b87 to
f3ccc8b
Compare
|
Squashed the changelog commit into the first commit. |

This pull request improves the text contrast for highlighted rows in dark mode.
It also simplifies the color scheme setup by not using a magic array.
Before:
