From aa6ad505be9927dc062661a163219f0f1ec076f0 Mon Sep 17 00:00:00 2001 From: Noratrieb <48135649+Noratrieb@users.noreply.github.com> Date: Sun, 21 Sep 2025 21:30:51 +0200 Subject: [PATCH 1/2] Improve range-diff color contrast in dark mode The current colors are very low contrast, and therefore very hard to read. This replaces the colors with significantly brighter ones to improve contrast a lot. The red drifted a lot into the orange, because when making the red brighter, it just got *harder* to read for me because red on black is bad combination. So i just made it slightly orange, which looks a lot better. I did not pick the colors from `git range-diff` itself because the red there is still pretty low contrast. The colors now have a comfortable ~4.55 (AA accessibility) contrast according to developer tools. --- src/gh_range_diff.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gh_range_diff.rs b/src/gh_range_diff.rs index 77a6ade95..87a142903 100644 --- a/src/gh_range_diff.rs +++ b/src/gh_range_diff.rs @@ -303,10 +303,10 @@ fn process_old_new( color: rgba(0, 255, 0, 1); }} .line-removed-before {{ - color: rgba(100, 0, 0, 1); + color: rgb(206, 48, 0); }} .line-added-before {{ - color: rgba(0, 100, 0, 1); + color: rgba(11, 142, 0, 1); }} .word-removed-after {{ color: black; From 68d0c2df25a2d69fd32774c24bd753fbfb9d1d77 Mon Sep 17 00:00:00 2001 From: nora <48135649+Noratrieb@users.noreply.github.com> Date: Mon, 29 Sep 2025 12:27:56 +0200 Subject: [PATCH 2/2] Use a more pastel red for the old state removed Co-authored-by: Urgau <3616612+Urgau@users.noreply.github.com> --- src/gh_range_diff.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gh_range_diff.rs b/src/gh_range_diff.rs index 87a142903..09dedc847 100644 --- a/src/gh_range_diff.rs +++ b/src/gh_range_diff.rs @@ -303,7 +303,7 @@ fn process_old_new( color: rgba(0, 255, 0, 1); }} .line-removed-before {{ - color: rgb(206, 48, 0); + color: rgb(255, 159, 131); }} .line-added-before {{ color: rgba(11, 142, 0, 1);