emacs-devel
[Top][All Lists]
Advanced

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

Re: Darkening font-lock colors


From: Lennart Borgman
Subject: Re: Darkening font-lock colors
Date: Mon, 3 Aug 2009 22:01:58 +0200

On Mon, Aug 3, 2009 at 7:13 AM, Miles Bader<address@hidden> wrote:
> Lennart Borgman <address@hidden> writes:
>> My favorites have changed a bit (or maybe I have changed). RosyBrown4
>> is unfortunately rather dull. It is possible to use more colored
>> colors which are easier to distinguish.
>
> Being "easy to distinguish" is not the only goal.  There's also
> "not driving the user insane" and "what my momma done used".

Going into a state of "insanity" might be a good chance for a change...


> The thing is that every user seems to have different ideas what the
> optimal goal is (thus stupid flame-wars anytime anyone suggests changing
> face colors)...

Yes, but I think most people will agree that default colors that are
good from an accessibility vewpoint should be favoured. And that also
estetics and usability are very important.

I have found it surpisingly hard to find colors that have both good
luminance color contrast (accessibility, suggested by WCAG) and are
distinguishable and pleasant (usability). And then I did not even
consider color blindness (which I think should go on top of this).

As I have told before one reason that this problem is hard to solve is
that when you raise the contrast requirement you get fewer colors to
play with. In my little tool (which you can currently find on
EmacsWiki) I have a tweaked version of list-colors-display (called
flct-list-colors-display) where I sort colors according to contrast
and hue. Looking at this color list display makes it very apparent how
few distinguishable colors there are too choose from.

It also makes another thing apparent. The colors that have good
contrast are mostly rather hard while the soft and nice colors have
less contrast. (Actually I wonder if this is one reason for some
people prefer dark backgrounds. Then they can have more friendly
colors in foreground. But personally I found it a bit harder to read
on dark backgrounds.) Using more friendly colors probably help getting
you into a good mood and makes you more creative - but they must of
course be readable.

Now how can we tackle this dilemma?

I suggest we have one resource that we have not used: The background color.

Using different backgrounds for different parts is a powerful tool
that makes those parts stand out (so it should be used cautiously).
This is of course why it is used for selection (with a color that
stands out). It is also a common tool in web page design to help users
understand the structure of the page (and also too fool them ...). So
on a computer screen users are aware of this kind of use of background
colors.

The luminance color contrast when using a slightly colored background
(in the case of light backgrounds of course) is still very good. This
is probably a surprise for many people. There are some no-no:s like
using the opposite colors from the color wheel for foreground and
backgrounds that of course should be avoided. But apart from that I
think there are no accessibility problems. From a usability view it is
in my opinion important that the backgrounds are only slightly colored
since otherwise it is distracting.

So I would suggest using friendly slightly colored backgrounds for
different parts. When it comes to syntactic font locking there are
three parts where I can see it can be used: Comments, doc strings and
normal strings. Those parts should in my opinion stand out a little
bit since all the text in a such part belongs together. This means
that the background color does not distract the logic view of the
buffer, but enhances it.

I have changed my color suggestions to reflect this in

    http://www.emacswiki.org/emacs/font-lock-color-test.el


BTW: I have long used colored backgrounds in MuMaMo/nXhtml. From the
beginning I heard some protests, but I have heard none for long time.
I saw one user complained recently (though not directly to me) but I
think this was more due to the low contrast in the current default
font lock faces.




reply via email to

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