bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#33398: 26.1, netbsd-8; Hi Lock Faces, Hi Green B, default setting su


From: Juri Linkov
Subject: bug#33398: 26.1, netbsd-8; Hi Lock Faces, Hi Green B, default setting suggestion
Date: Sat, 24 Nov 2018 23:29:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>>  (defface hi-pink
>> -  '((((background dark)) (:background "pink" :foreground "black"))
>> -    (t (:background "pink")))
>> +  '((((min-colors 88) (background dark))
>> +     (:background "pink" :foreground "black"))
>> +    (((background dark)) (:background "red" :foreground "black"))
>> +    (((min-colors 88)) (:background "pink"))
>> +    (t (:background "red")))
>>    "Face for hi-lock mode."
>>    :group 'hi-lock-faces)
>
> Thanks for working on this, but unfortunately changing the default
> colors for Emacs faces is not that easy (which is why we do that only
> very rarely).

I understand that face changing is very sensitive area, so I don't insist
on these changes if the result is worse.  What I was trying to do is to
add 2 more default colors: the current 4 is too small number of the default
background colors, so adding 2 colors will at least cover all available
6 non-black-white colors on a 8-color TTY.

> You cannot test your colors in just two points: 8-color TTY and
> 256-color display (you probably used a GUI frame?).  For starters,
> there's the 16-color TTY, where according to my testing your changes
> are for the worse.  And I would also suggest to test with a 88-color
> TTY.  You need to test for both dark and light backgrounds.

I tested these colors with TERM=xterm-256color where running

emacs -Q -nw --color=8 -f list-colors-display

displays a list of 8 colors, good.  But running

emacs -Q -nw --color=16 -f list-colors-display

displays a list of 256 colors, the same number of colors properly displayed by

emacs -Q -nw --color=256 -f list-colors-display

Is this a bug in Emacs?  Could you recommend a better way
to test a 16-color palette on a TTY?

> In general, if the automatic color translation in tty-colors.el does a
> good job (you can test that by specifying the X color and watching the
> result), it is best not to have a special definition for the
> corresponding min-colors.  So, for example, for the new hi-magenta and
> hi-cyan faces you introduce, please see whether you really need the
> definitions for less than 88 colors -- they will only be needed if the
> automatic translation produces unpleasant results.

For the new faces I copied the defface spec conditions from the existing
faces hi-yellow and hi-green that have separate conditions for less than
88 colors.  But we could drop unnecessary conditions here as well.





reply via email to

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