UI: Automatic color contrast correction#3335
Open
viklequick wants to merge 5 commits into
Open
Conversation
akruphi
reviewed
Apr 5, 2026
Contributor
|
@elfmz вроде дельный PR - интересная фича и полностью опционально вкл/выкл. Или есть что-то препятствующее его принятию? |
Contributor
Author
|
Как вариант -- можно дефолтную тему переделать. Как минимум убрать светло-циано-зеленый фон у edit fields, и желтый у "горячих клавиш" на сером. Но на это нужно волюнтаристское решение ;-) А тут математика чуть-чуть подтягивает цвета. Зато с виду незаметно что что-то меняется. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem: for many cases, especially for default theme, the texts are taintly readable. Classic example: disabled text in edit boxes is displayed as "cyan/light green background. light gray text". As te result, it cannot be readed.
The solution: using computations in LAB colorspace, and using CIEDE2000 delta-E checks, adjust colors slightly, without change of colors itself but luminance.
Left side has no corrections, disabled texts are unreadable; right side the same but after slight adjustment of luminance.
By default, it works for all themes and adjusts the palette only once, when theme or colors are being loaded from farcolors.ini.