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
:
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);
GitHub's diff color as of 2014
Resources
- Add user preferences to customize Diffs colors (gitlab-org/gitlab!78281 by @wwwjon
- GitLab 14.10 released with individual compliance violation reporting and a UI for streaming audit events (APR 22, 2022)
- primer/css source code: https://github.com/primer/css/blob/6f7726a97e8aebe7620c93d6746a16147f7b80d7/src/support/mixins/color-modes.scss
Image courtesy of GitHub: https://github.blog/2014-09-04-better-word-highlighting-in-diffs/
Top comments (0)