DEV Community

Martin Grüner
Martin Grüner

Posted on Originally published at martingruner.com AI-assisted

Change red and green diff highlights to blue and yellow

When red and green highlights are difficult to distinguish, checking a code change can take another pass just to work out what was added or removed.

I make Diff Anything, a local file-comparison app for Mac and Windows. Its settings include a blue-and-yellow alternative to the default red-and-green palette.

Change the palette

  1. Open Settings.
  2. Under Appearance, find Difference colors.
  3. Choose Blue and yellow, then Save Settings.

Additions appear in blue, removals in yellow, and changed values in neutral gray. The setting works in light and dark themes.

Check the meaning as well as the highlight

Try a small pair of JSON files with one added field, one removed field, and one changed value. That gives you a familiar result to check before reviewing a larger file.

JSON comparison with red and green highlights

The same comparison with blue and yellow highlights

The files and comparison results are the same in these images. Written Added, Removed, and Changed labels provide another cue alongside color.

A palette is a preference to try, rather than a promise that it suits everyone's vision. Check it with files you know and keep the written labels in your review.

The color setting is included in Free. Comparisons run locally, with no AI involved.

Read the full guide and try Diff Anything.

Top comments (0)