DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 963,274 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Cover image for GitLab diff color system
T "@tnir" N
T "@tnir" N

Posted on • Updated on

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/

Top comments (0)

Update Your DEV Experience Level:

Settings

Go to your customization settings to nudge your home feed to show content more relevant to your developer experience level. πŸ›