enhance: improve diff contrast in light and dark themes - #37477
Merged
silverwind merged 9 commits intoJul 22, 2026
Merged
Conversation
Co-authored-by: Hermes Agent (GPT-5.5) <hermes-agent@nousresearch.com> Signed-off-by: cyphercodes <cyphercodes@users.noreply.github.com>
Contributor
|
Screenshots? |
Contributor
wxiaoguang
reviewed
May 1, 2026
wxiaoguang
marked this pull request as draft
May 1, 2026 18:45
Member
silverwind
reviewed
May 7, 2026
silverwind
reviewed
May 7, 2026
Member
|
👍 on the test approach. Formal color validation is great. |
Co-Authored-By: Hermes Agent <hermes@noreply.local>
Contributor
Author
|
Pushed a small follow-up for the straightforward review nit:
Local verification:
I left the color/luminance feedback unchanged because the remaining comments look design/implementation-direction dependent (brightness/screenshots and whether to reuse the existing non-WCAG luminance helper vs. this test's WCAG contrast calculation). |
Merged
Contributor
|
ping @silverwind |
Member
|
Did all fixes, removed the overly-bright AAA stuff, AA is enough.
|
- deletion counter: swap the pink #ff8585 for the saturated #fb5f5b, closer to GitHub and clearing the >=5 contrast the issue asks for without overshooting into brightness - keep syntax name/type distinct: only name reverts to #fabd2f, type stays at #eb8cb3 - drop the colorblind AAA bumps; the originals already exceed the floor and match GitHub's colorblind palette - test: use colord's WCAG contrast with github-parity thresholds Assisted-by: Claude:Opus-4.8
Assisted-by: Claude:Opus-4.8
It only re-reads the theme's hex values and gates them on a contrast formula, guarding a rare and deliberate change while baking in a single assumed background that is not always the real render surface. The color and semibold changes are the actual fix. Assisted-by: Claude:Opus-4.8
Member
|
Also I have removed this test, I think it does not bring much value and was inprecise (backgrounds can vary). A proper such test would need to be an e2e test and that is overkill for this imho. |
The light diff stat counters had poor contrast on the file header, worst of all the added green at 2.56:1. Darken the added/removed and colorblind foregrounds to github-like hues that clear >= 5:1 on the --color-box-header background. Assisted-by: Claude:Opus-4.8
Member
|
Did some light mode changes as well:
|
silverwind
marked this pull request as ready for review
July 22, 2026 11:04
silverwind
approved these changes
Jul 22, 2026
wxiaoguang
approved these changes
Jul 22, 2026
silverwind
added a commit
that referenced
this pull request
Jul 22, 2026
) Backport #37477 by @cyphercodes Fixes #37448 Adjust the diff stat counter and syntax colors in both light and dark themes to github-like colors that meet a >= 5:1 contrast floor (>= 7:1 for syntax names on diff rows), and make the counters semibold. Signed-off-by: cyphercodes <cyphercodes@users.noreply.github.com> Co-authored-by: Rayan Salhab <r.salhab@aiyexpertsolutions.com> Co-authored-by: cyphercodes <cyphercodes@users.noreply.github.com> Co-authored-by: Hermes Agent (GPT-5.5) <hermes-agent@nousresearch.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Hermes Agent <hermes@noreply.local> Co-authored-by: silverwind <me@silverwind.io>
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.
Fixes #37448
Adjust the diff stat counter and syntax colors in both light and dark themes to github-like colors that meet a >= 5:1 contrast floor (>= 7:1 for syntax names on diff rows), and make the counters semibold.