Discussion:
Turning off colorization
Tassilo Horn
2014-11-07 06:36:02 UTC
Permalink
If you use shr as `mm-text-html-renderer' which is the default, then
HTML colors should be auto-adjusted so that they stay readable. If you
still get "light-X" foreground on "a-little-less-X" background, you can
try increasing the minimum color distances used. For example, I use
(setq shr-color-visible-distance-min 10
shr-color-visible-luminance-min 60)
to have a bit more contrast.
It's a pity this isn't documented in any of our manuals.
Yes, I think this question has indeed popped up a few times already.
I've just looked into the Gnus manual, and I guess it would fit well in
section (info "(gnus)HTML").

I'll go give it a try to update that section...

Bye,
Tassilo
Tassilo Horn
2014-11-07 07:59:05 UTC
Permalink
Post by Tassilo Horn
Yes, I think this question has indeed popped up a few times already.
I've just looked into the Gnus manual, and I guess it would fit well in
section (info "(gnus)HTML").
I'll go give it a try to update that section...
Thank you.
It seems like most (all?) of shr documentation is in eww.texi, so
perhaps you should do it there instead.
I think the HTML article section is the place users will have a look
first, and that was outdated anyway. So now it mentions shr, and
there's a footnote that points to a new Gnus FAQ entry 4.16:

--8<---------------cut here---------------start------------->8---
Question 4.16
.............

How can I ensure more contrast when viewing HTML mail?

Answer
......

Gnus’ built-in simple HTML renderer (you use it if the value of
‘mm-text-html-renderer’ is ‘shr’) uses the colors which are declared in
the HTML mail. However, it adjusts them in order to prevent situations
like dark gray text on black background. In case the results still have
a too low contrast for you, increase the values of the variables
‘shr-color-visible-distance-min’ and ‘shr-color-visible-luminance-min’.
--8<---------------cut here---------------end--------------->8---

But yes, I think the two variables should be documented in eww.texi,
too. I've just done that.
In any case, please have a cross-reference from the other manual to
where this is described.
Ok, that's now also in place (Gnus -> EWW).

Bye,
Tassilo
Eli Zaretskii
2014-11-07 09:00:38 UTC
Permalink
Date: Fri, 07 Nov 2014 08:59:05 +0100
But yes, I think the two variables should be documented in eww.texi,
too. I've just done that.
In any case, please have a cross-reference from the other manual to
where this is described.
Ok, that's now also in place (Gnus -> EWW).
Thanks. I back-ported that to the emacs-24 branch, and also fixed a
typo.

(In general, any improvements in the documentation of features that
exist on the branch should be committed to the branch.)

Loading...