This forum has been archived. All content is frozen. Please use KDE Discuss instead.

kmail in breeze dark mode

Tags: None
(comma "," separated)
HinzundKunz
Registered Member
Posts
6
Karma
0
OS

kmail in breeze dark mode

Tue Sep 18, 2018 6:02 am
Hello everyone,

I've been using kde/kontact for over ten years now and have returned to it numerous times after trying evolution, thunderbird etc.

Recently I switched to breeze dark as standard. Now I have the problem that within kmail, some emails I receive aren't readable (dark blue on dark grey background). Is there a way to solve this?

Thanks very much for any help!
User avatar
progdan
KDE Developer
Posts
90
Karma
0
OS

Re: kmail in breeze dark mode

Wed Sep 19, 2018 9:28 am
Unfortunately, many senders who send HTML emails just assume light color scheme, so they hardcode dark font colors into the email but don't bother hardcoding a light background to keep the contrast. When you use Breeze Dark, the email viewer picks up the dark font colors from the email but since there's no background information it falls back to your system color scheme, so you end up with dark text on dark background. Te same also happens with senders hardcoding light background but assuming dark/black font color, so it again breaks as in Breeze Dark the default font color is light.

There's no easy fix for that, as KMail would need to be able to "see" the email to figure out what's wrong and somehow adjust the colors by forcing light background or light fonts, but even that wouldn't work 100% in more fancy and complicated emails. The best way is to report this to the sender, after all, it's their emails that are broken :-)


Daniel Vrátil | www.dvratil.cz | dvratil@kde.org
IRC: dvratil on Freenode (#kde, #kontact, #akonadi, #fedora-kde)
airdrik
Registered Member
Posts
1854
Karma
5
OS

Re: kmail in breeze dark mode

Wed Sep 19, 2018 7:24 pm
Depending on the sender(s), it may be easier to make adjustments to the color scheme to accommodate colors expected to be used in e-mails.
Of note (unless this has changed since Plasma 4), Kmail uses the View Text and Background colors from the system color scheme as the defaults for rendering e-mail. On top of that Kmail itself allows specifying custom colors for certain elements under Settings -> Configure Kmail -> Appearance -> Colors; however only the background color can be specified there.

I've usually used some kind of off-white for the system View Text color so that it's generally close enough to white for easy reading on medium-to-dark backgrounds but is also dark enough that it can still be read on white backgrounds. Similarly I've used medium-dark backgrounds that are dark enough to fit in with the dark color scheme but light enough for the blacks and dark-blues commonly used in e-mails to be readable.


airdrik, proud to be a member of KDE forums since 2008-Dec.
barrys
Registered Member
Posts
2
Karma
0

Re: kmail in breeze dark mode

Sat Oct 20, 2018 2:24 pm
Isn't it a mistake to change the HTML default background to the theme's background colour?

All HTML assumes that the default background is white.
If kmail maintains this API them the HTML will rendered as expected.

It is surely something that the sender can have any reasonable expectation
of knowing the theme that I'm running at any moment?

Barry
airdrik
Registered Member
Posts
1854
Karma
5
OS

Re: kmail in breeze dark mode

Fri Oct 26, 2018 6:37 pm
well, defaulting to a white background is a compromise that I think most people who use dark color schemes are usually okay with/consigned to just because most sites use dark-on-light color schemes. However, one can find browser plugins which invert the colors used by web pages, so with some work one should be able to set up everything to use light-on-dark everywhere.

In the case of Kmail, I see 3 cases that would need to be handled: No colors are provided, Only foreground or only background is provided (usually assuming dark-on-light), both foreground and background colors provided (there's also a 4th when the background color is provided without a foreground, but I think it is more rare). I can see 3 options for handling these: The first is to concede wholly to dark-on-light for html e-mails (and really all e-mail for consistency). The second is similar to what we have now, but improves handling for the 2nd (and 4th) cases by using to dark-on-light defaults rather than using the color scheme. The third option would attempt to adjust the colors provided in the html to match or work with the user's color scheme, possibly just inverting the lightness of the colors (e.g. black -> white, white -> black, dark red -> light red, light red -> dark red, etc.) when using a light-on-dark color scheme.


airdrik, proud to be a member of KDE forums since 2008-Dec.
barrys
Registered Member
Posts
2
Karma
0

Re: kmail in breeze dark mode

Sat Oct 27, 2018 1:49 pm
Having an perference to allow an "auto-dark-mode" be turned on would be fine.

But I think that forcing white is needed until such a feature exists.

Barry


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], rockscient, Yahoo [Bot]