Skip to content

Conversation

@Noratrieb
Copy link
Member

@Noratrieb Noratrieb commented Sep 21, 2025

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.

image

fixes #2183

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.
@Urgau Urgau self-requested a review September 27, 2025 14:33
@Urgau
Copy link
Member

Urgau commented Sep 27, 2025

I tested the change on a few different range diffs and this looks better, although the difference between the two reds is maybe too minimal now.

Before After
image image
image range-diff image

.

@Noratrieb
Copy link
Member Author

I don't think we have much if any acceptable range of brightness for red on black.

@Urgau
Copy link
Member

Urgau commented Sep 27, 2025

I tried playing with some red colors but the contrast checker wasn't very happy. The only thing I can think of would be to go for more brown-ish colors (rgb(185, 98, 72) in the example below), there the distinction is more pronounced.

image

@Noratrieb
Copy link
Member Author

Yeah I think changing the hue is a good strategy, I also went a bit into the orange originally. I think I'd make that brown a bit brighter, I don't find the contrast very good. But something along those lines should work probably and give the visible contrast between before and after.

@Urgau
Copy link
Member

Urgau commented Sep 29, 2025

We experimented in private and found that pastel colors provided more contrast with the bright red and black background, so let's go with that. rgb(255, 159, 131)

image

@Urgau Urgau added this pull request to the merge queue Sep 29, 2025
Merged via the queue into rust-lang:master with commit 86df7ae Sep 29, 2025
3 checks passed
@Noratrieb Noratrieb deleted the range-diff-colors branch September 29, 2025 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The dimmed colors of our range-diff are too dimed in dark mode

2 participants