Forem

Cover image for GitLab diff color system
T "@tnir" N
T "@tnir" N

Posted on • Edited on

2 1

GitLab diff color system

GitLab recently allows every user to modify colors in diff.

I have used the default values with Monokai syntax highlight for 7 years at GitLab.com:

My preference on GitLab.com used for 7 years

However, today I found these are not perfectly configured and so I need to change it soon.

What color have used for it for 7 years?

  • deletion: #c87872
  • addition: #678528

What color should I use for it from today?

For light theme, I can choose:

  • deletion: #FFEBE9
  • addition: #E6FFEC

Why?

As I use GitHub as well as GitLab, the colors in both should be the same if possible.

Ciao! 👋

References from GitHub (as of 2022-07-13)

--color-diff-blob-addition-num-bg: #CCFFD8;
--color-diff-blob-addition-line-bg: #E6FFEC;
--color-diff-blob-addition-word-bg: #ABF2BC;
--color-diff-blob-deletion-num-bg: #FFD7D5;
--color-diff-blob-deletion-line-bg: #FFEBE9;
--color-diff-blob-deletion-word-bg: rgba(255,129,130,0.4);
Enter fullscreen mode Exit fullscreen mode

GitHub's diff color as of 2014

Image description

Resources

Image courtesy of GitHub: https://github.blog/2014-09-04-better-word-highlighting-in-diffs/

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

Top comments (0)

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay