]> git.ipfire.org Git - thirdparty/patchwork.git/commit
css: make diff colors more accessible
authorRobin Jarry <robin@jarry.cc>
Wed, 5 Oct 2022 14:24:05 +0000 (16:24 +0200)
committerStephen Finucane <stephen@that.guru>
Thu, 31 Oct 2024 23:14:17 +0000 (23:14 +0000)
commit794bdb9863dcb802f1d384da8ecc46f8783c219d
treed66ff62028ac4bd21ed4b7e9948c106024b0bab0
parent5c4b660ecefcbc349b6279ed7b987ae7ed3d5fc5
css: make diff colors more accessible

The colors used to display patch diffs are confusing. The context color
is very similar to the added line color and the contrast between added
and removed lines is very low.

Originally, the choice of purple/blue (instead of the more common
red/green palette) may have been made with colorblindness accessibility
in mind. However, after inspecting the current colors with
colorblindness "simulators", I found that the low contrast was
consistent no matter what vision deficiency (if any) you might have.

Update the colors to use a more common red/green palette. Add background
colors to increase contrast for colorblind people. Use less confusing
colors for context and diff hunks. Use normal line height to prevent
background colors from overlapping. Use a different color for email
quotes (blue) to avoid confusion with added lines.

I have made a compilation of the current and updated color palette
previews for normal vision and all common color deficiencies. I also
included the same diff as seen from Github interface for reference.

Link: http://files.diabeteman.com/patchwork-diff-colors/
Signed-off-by: Robin Jarry <robin@jarry.cc>
(cherry picked from commit c443cd9c0e96ca21842a188f9101b1a8244535ee)
htdocs/css/style.css
releasenotes/notes/make-diff-colors-more-accessible-82eda58a89984d46.yaml [new file with mode: 0644]