Skip to content

Commit aa6ad50

Browse files
committed
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.
1 parent 885b6ed commit aa6ad50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/gh_range_diff.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,10 +303,10 @@ fn process_old_new(
303303
color: rgba(0, 255, 0, 1);
304304
}}
305305
.line-removed-before {{
306-
color: rgba(100, 0, 0, 1);
306+
color: rgb(206, 48, 0);
307307
}}
308308
.line-added-before {{
309-
color: rgba(0, 100, 0, 1);
309+
color: rgba(11, 142, 0, 1);
310310
}}
311311
.word-removed-after {{
312312
color: black;

0 commit comments

Comments
 (0)