emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Re: About the :distant-foreground face attribute


From: Daniel Colascione
Subject: Re: [PATCH] Re: About the :distant-foreground face attribute
Date: Tue, 14 Jan 2014 12:06:07 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

On 01/14/2014 12:01 PM, Jan Djärv wrote:
14 jan 2014 kl. 19:47 skrev Daniel Colascione <address@hidden>:

On 01/14/2014 03:44 AM, Jan D. wrote:
Daniel Colascione skrev 2014-01-14 11:44:
On 01/14/2014 01:34 AM, Jan D. wrote:
Given the use case at hand, we know for a fact that the background is
the region background, so I don't understand why a calculated
foreground
is needed.  Just pick one that matches the background.
There might be other use cases where a calculated foreground makes
sense, but my imagination fails me here.

Calculated foreground colors look better: they resemble the font-lock
colors on which they're based.

For the region case, that would imply the possibility of different
foregrounds for marked text, none which is the actual font-lock color.

It *is* the same color in the sense that the code we generate has the
same hue. How on earth is that worse than changing arbitrary font-locked
pieces of text to the system selection foreground color?

Because the system color foreground is (presumably) choosen to look good
together with the system color background.

Yes, and a color we algorithmically generate from a font-lock face will *also* 
look good against that background color, but 1) will be distinct from other 
faces replaced for lack of contrast, and 2) will be visually similar to the 
pre-highlight face. Have you tried the patch?

No.  If Emacs generates a color, Emacs desides what looks good.  If
the system defines a color, the system (or the user if customized)
desides what looks good.  I don't think it matters what I think about
colors generated by your patch, I might even think they look better
than many system defined colors.  But as a principle I think the
desision is not Emacs to make *by default*.  Users may of course
apply customizations to Emacs and change it.

In 24.4, Emacs has already been changed to override the system selection foreground color with various font-lock faces. Why is it okay to do that when there's no contrast problem, but suddenly, when there's a contrast problem, we can say that the principle of following system colors is important? You're applying this principle very selectively. If you're going to override the system color selection, you need to do it well and consistently, and automatic contrast adjustment is the best way to go about solving the inevitable contrast problems that arise when you combine colors you control with colors you don't.



reply via email to

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