emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Consistent face for keys in *Help* and `substitute-command-keys'


From: Juri Linkov
Subject: Re: Consistent face for keys in *Help* and `substitute-command-keys'
Date: Mon, 08 Mar 2021 19:43:18 +0200

>>  (defface help-key-binding
>> -  '((((class color) (min-colors 88) (background light)) :foreground 
>> "ForestGreen")
>> -    (((class color) (min-colors 88) (background dark)) :foreground 
>> "#44bc44")
>> -    (((class color grayscale) (background light)) :foreground "grey15")
>> -    (((class color grayscale) (background dark)) :foreground "grey85")
>> -    (t :foreground "ForestGreen"))
>> +  '((((class color) (min-colors 88) (background light)) :background 
>> "grey85")
>> +    (((class color) (min-colors 88) (background dark)) :background "grey25")
>> +    (((class color grayscale) (background light)) :background "grey85")
>> +    (((class color grayscale) (background dark)) :background "grey25")
>> +    (t :background "grey85"))
>>    "Face for keybindings in *Help* buffers.
>
> Excellent idea, let's do it.  But grey85 is much too dark.  Compare
> grey85 (using M-x list-colors-display) to the hexadecimal values used in
> the VSCode documentation or on GitHub, and see that they use very bright
> greys (#f9f2f4 and #f6f8fa) while grey85 is #d9d9d9.
>
> I was toying with the much brighter grey95 (or perhaps something even
> brighter -- again, compare the hexadecimal values).

I completely agree.  I retained "grey85" that was used for foreground,
but it's not suitable for background.  But OTOH, "grey95" is almost
indistinguishable from the default white background.

GitHub and GitLab use "grey90" for light and "grey25" for dark,
so I changed now accordingly.

> Did you test this on a terminal, BTW?  What do you think?

These faces look nice on a terminal.

> Another thing I see is that they use more padding (a bigger square)
> around the keybindings.  We can muck around with the display properties
> to achieve something similar, but the lines won't be even height.  It
> would automatically look slightly better here if our `line-spacing'
> variable was something like 1, 2 or even 3 by default in these buffers.
> (This would really be a better all-around choice in all buffers for
> legibility, and is what is done on all modern text editors AFAICT.)

When trying to use the style :background "grey90"
:box (:line-width 2 :style released-button)
the look is much nicer, but at the cost of wasting more vertical space
for higher lines.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]