[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#33567: Syntactic fontification of diff hunks
From: |
Juri Linkov |
Subject: |
bug#33567: Syntactic fontification of diff hunks |
Date: |
Fri, 21 Dec 2018 00:17:04 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) |
>> Neither GitHub nor GitLab have foreground green/red colors, only background
>> green/red colors.
>
> Speaking of GitHub and GitLab, I wonder if we should take another cue from
> them and tone down our background colors as well.
>
> This makes the new diffs more readable for me:
>
> (eval-after-load 'diff-mode
> '(progn
> (set-face-background 'diff-added "#eeffee")
> (set-face-background 'diff-removed "#ffeeee")
> (set-face-background 'diff-refine-added "#d0ffd0")
> (set-face-background 'diff-refine-removed "#ffd0d0")
> ))
Good idea.
But please see in https://debbugs.gnu.org/10181#68
why red and green colors are not symmetrical and
how is was wrong on GitHub.
After my post GitHub realized their mistake and
now they use #fbb instead of #faa.
So instead of #cfc a better color for refine-added is #bfb.
Here's a table with additional columns labeled "appr" (approximated)
where colors are rounded to the closest shorthand hex triplet:
GitHub appr GitLab appr current new better
removed #ffeef0 #fee #fbe9eb #fee #ffdddd #ffeeee
added #e6ffed #efe #ecfdf0 #efe #ddffdd #eeffee
refine-removed #fdb8c0 #fbb #fac5cd #fcc #ffbbbb #ffd0d0 #ffcccc
refine-added #acf2bd #aeb #c7f0d2 #cec #aaffaa #d0ffd0 #bbffbb
Your proposed new colors for added/removed are the same that are used
GitHub/GitLab, so this should be a good change. For refine-removed
better to use GitLab's color #ffcccc that is very close to the
color you proposed. But for refine-added GitLab made the same mistake
that GitHub already fixed. So the best color for refine-added is #bbffbb.
While at it, please also tone down file/hunk header colors:
diff-header from grey80 to grey90 and
diff-file-header from grey70 to grey80
This will produce nice-looking colors.
- bug#33567: Syntactic fontification of diff hunks, (continued)
- bug#33567: Syntactic fontification of diff hunks, Juri Linkov, 2018/12/26
- bug#33567: Syntactic fontification of diff hunks, Dmitry Gutov, 2018/12/26
- bug#33567: Syntactic fontification of diff hunks, Juri Linkov, 2018/12/26
- bug#33567: Syntactic fontification of diff hunks, Dmitry Gutov, 2018/12/26
- bug#33567: Syntactic fontification of diff hunks, Eli Zaretskii, 2018/12/26
- bug#33567: Syntactic fontification of diff hunks, Eli Zaretskii, 2018/12/26
- bug#33567: Syntactic fontification of diff hunks, Juri Linkov, 2018/12/19
- bug#33567: Syntactic fontification of diff hunks, Dmitry Gutov, 2018/12/19
- bug#33567: Syntactic fontification of diff hunks, Juri Linkov, 2018/12/20
- bug#33567: Syntactic fontification of diff hunks, Dmitry Gutov, 2018/12/19
- bug#33567: Syntactic fontification of diff hunks,
Juri Linkov <=
- bug#33567: Syntactic fontification of diff hunks, Juri Linkov, 2018/12/25
- bug#33567: Syntactic fontification of diff hunks, Dmitry Gutov, 2018/12/25
- bug#33567: Syntactic fontification of diff hunks, Juri Linkov, 2018/12/26
- bug#33567: Syntactic fontification of diff hunks, Dmitry Gutov, 2018/12/26
- bug#33567: Syntactic fontification of diff hunks, Juri Linkov, 2018/12/27
- bug#33567: Syntactic fontification of diff hunks, Juri Linkov, 2018/12/29
- bug#33567: Syntactic fontification of diff hunks, Dmitry Gutov, 2018/12/30
- bug#33567: Syntactic fontification of diff hunks, Dmitry Gutov, 2018/12/25
- bug#33567: Syntactic fontification of diff hunks, Dmitry Gutov, 2018/12/03
- bug#33567: Syntactic fontification of diff hunks, Juri Linkov, 2018/12/03