Hi,
I've implemented two new diff themes in Gerrit's old UI. They are meant to address the following two issues:
1. The default diff theme used in Gerrit places dark red and purple text on a dark red background (in removed code). This can be hard to read. Especially on a yellow-tinted monitor (e.g. Red shift, Night shift, Flux, etc.).
2. The general use of green/red while readable, is hard to distinguish for certain types of color-blindness.
== Theme 1: "elegant" (Screenshot at https://phabricator.wikimedia.org/T232893)
This theme adopts the MediaWiki diff styles (yellow and blue). Which means: * It only colours the background of the intra-line characters that were added/changed/removed. * The rest of the line uses a clean white background, thus providing full colour contrast for all other syntax-highlighted code. * The boundary of the added/removed blocks is indicated by a border (not by absence of a background shade). * The unchanged code lines are lightly shaded in grey (instead of the default where these lesser important lines are given a bright white background).
In other words, just like MediaWiki :)
== Theme 2: "eclipse" (Screenshot at https://phabricator.wikimedia.org/T232893)
* The background greens and reds are lighter overall, stronger colour contrast. The background reds have moved closer to orange, the greens have moved closer toward cyan/blue.
Overall this theme is still very close to the default Gerrit theme, and might be a good option if you've found the readability a concern but would rather not make as much of a radical change (yet :D).
== How to change my diff theme?
From any diff in Gerrit:
1. Click the gear icon in the top-right corner. 2. Select a Theme. (This provides a live preview!) 3. Press "Save" if you like it.
Alternatively, you can change it (without live preview) from the Settings page: https://gerrit.wikimedia.org/r/#/settings/diff-preferences
== What about the new UI?
The new UI already has better colour contrast in its diff styles, with lighter background reds and greens by default.
Unfortunately the new UI has removed both the ability to theme the syntax highlighting, as well as the ability to theme the diff colours on top of that. Neither is changeable in the new UI currently.
For the time being I'm a hold out in the old UI as I'm unable to use review dashboards in the new UI (until we upgrade to 2.16). Meanwhile this is beneficial to myself and anyone else in a similar hold out.
-- Timo
wikitech-l@lists.wikimedia.org