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

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

bug#30295: closed (CSS mode colour highlighting makes text hard to read)


From: GNU bug Tracking System
Subject: bug#30295: closed (CSS mode colour highlighting makes text hard to read)
Date: Mon, 15 Jun 2020 20:14:01 +0000

Your message dated Mon, 15 Jun 2020 22:12:53 +0200
with message-id <87ftawm6ka.fsf@simenheg@gmail.com>
and subject line Re: bug#30295: CSS mode colour highlighting makes text hard to 
read
has caused the debbugs.gnu.org bug report #30295,
regarding CSS mode colour highlighting makes text hard to read
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
30295: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=30295
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: CSS mode colour highlighting makes text hard to read Date: Tue, 30 Jan 2018 16:55:14 +0000
In CSS mode, the value "green" or "#0f0" or "rgba(0,255,0,0.5)" is
displayed with a white foreground and a 100%-green background, which
is difficult to see.

A white foreground is chosen on even lighter colours, for example,
"#5e5" and "#87e087".

See functions css--contrasty-color in textmodes/css-mode.el and
color-distance in src/xfaces.c, and
<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25525>, and
<https://www.compuphase.com/cmetric.htm>.

If the color-distance is to be used, the appropriate formula is:

(if (> (color-distance name "black") (color-distance name "white"))
"black" "white")

That formula still maps "green" to "white", but it does at least map
lighter colours such as "#38e038" to "black".

For what it's worth, in my inexpert opinion it makes more sense to
compare the luma against that of mid-grey as Tom originally proposed.



--- End Message ---
--- Begin Message --- Subject: Re: bug#30295: CSS mode colour highlighting makes text hard to read Date: Mon, 15 Jun 2020 22:12:53 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux)
The problem with these colors should now be fixed with Mattias' recent
changes in commit 68ae6faa7f1b4c348740667f98fbf1d1ce5a7979 on
master. Closing.

-- Simen


--- End Message ---

reply via email to

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