Bug 414100 - Text not visible when using dark theme
Summary: Text not visible when using dark theme
Status: CONFIRMED
Alias: None
Product: kmail2
Classification: Applications
Component: UI (show other bugs)
Version: 5.9.3
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 423912 428500 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-11-13 17:01 UTC by megsvard
Modified: 2023-12-05 20:22 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Inverse background (36.72 KB, image/png)
2020-11-08 11:51 UTC, Thomas Tanghus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description megsvard 2019-11-13 17:01:21 UTC
SUMMARY
When using "Breeze Dark" Look And Feel, KMail displays HTML messages with no background color set using the theme's default background color (dark grey).  This makes it difficult/impossible to read text content, because the font color defaults to black, and it is displayed on dark background.

STEPS TO REPRODUCE
1. Set "Breeze Dark" Look And Feel in System Settings 
2. Start KMail
3. Open an HTML email message containing text and with no background color set

OBSERVED RESULT
The text content of the email message is difficult to read, sometimes not readable at all, because it's shown as dark on dark background.

EXPECTED RESULT
The text content of the email message should be readable, even if a dark theme is set.

SOFTWARE/OS VERSIONS
Operating System: Debian GNU/Linux 10
KDE Plasma Version: 5.14.5
Qt Version: 5.11.3
KDE Frameworks Version: 5.54.0
Kernel Version: 4.19.0-6-amd64
OS Type: 64-bit

ADDITIONAL INFORMATION
I suggest the following possibile solutions:
(a) Force a white background when displaying an HTML message with dark (default?) font color and unspecified background color.
(b) Let the user decide which background color to use for displaying HTML messages whose background color is not set.
Comment 1 Adam Jimerson 2020-07-15 12:15:31 UTC
I have this same issue with KMail 5.14.2 (20.04.2) on FreeBSD 12.1-RELEASE-p7 using the "Breeze Dark" theme.
Comment 2 Christophe Marin 2020-11-08 09:35:57 UTC
*** Bug 428500 has been marked as a duplicate of this bug. ***
Comment 3 Christophe Marin 2020-11-08 09:37:53 UTC
*** Bug 423912 has been marked as a duplicate of this bug. ***
Comment 4 Christophe Marin 2020-11-08 09:53:58 UTC
There's no easy fix as users have different expectations.

eg https://bugs.kde.org/317803 where the reporter complained about using the system colors for HTML messages.

IMO, the (b) suggestion is unrealistic. There are too many ways to change a background color. On the page level, table, cell, or css attributes and all this can be mixed or only applied to parts of the message.

(a) is easier but then users will report that the background is white :) (see https://bugs.kde.org/365315 for akregator for example)
Comment 5 Thomas Tanghus 2020-11-08 10:22:29 UTC
As I wrote in #428500 Many if not all HTML mail composers assumes that the background is light, and thus doesn't specify a background colour. If you use e.g. Breeze dark it often leads to black letters on dark grey background.
Here it could possibly be solved by having a light background in HTML emails per default, perhaps with an option in Settings/Appearance/Colors.

If the HTML email has a background defined it will be automatically rendered instead, and if it has a background defined there's a high probability that it also sets the font colour(s).

It would - as far as I can see - solve both #317803 and #317198 and it would leave a very small (theoretical) subset where the text is difficult to read, as opposed to now when it is a very small subset that is easily readable.

Thanks for catching my duplicate btw. I'm pretty sure I searched for "dark theme" but didn't get any results - but I could be wrong ;)
Comment 6 Thomas Tanghus 2020-11-08 10:28:02 UTC
Looking at #365315 it looks like an Akregator issue as it sounds like doesn't honour any HTML/CSS defined colours. In KMail there is a difference between the text view and the HTML view.
Comment 7 Christophe Marin 2020-11-08 11:38:18 UTC
(In reply to Thomas Tanghus from comment #5)
> As I wrote in #428500 Many if not all HTML mail composers assumes that the
> background is light, and thus doesn't specify a background colour. If you
> use e.g. Breeze dark it often leads to black letters on dark grey background.
> Here it could possibly be solved by having a light background in HTML emails
> per default, perhaps with an option in Settings/Appearance/Colors.

We already received a report from a visually impaired user for whom a light background is an issue. 

In the KMail version I use, there's a "Do not change color from original HTML mail" option on the Appearance / Colors tab. Did you already try it?
Comment 8 Thomas Tanghus 2020-11-08 11:51:40 UTC
Created attachment 133142 [details]
Inverse background
Comment 9 Thomas Tanghus 2020-11-08 11:52:29 UTC
(In reply to Christophe Giboudeaux from comment #7)
> We already received a report from a visually impaired user for whom a light
> background is an issue. 

In what context is a light background an issue? I fail to see the relevanse here.
 
> In the KMail version I use, there's a "Do not change color from original
> HTML mail" option on the Appearance / Colors tab. Did you already try it?

This doesn't make any difference for most HTML emails, but for plain text it has the unwanted effect of reversing the dark theme. See attachment.
Comment 10 Andrew Shark 2023-10-03 08:39:41 UTC
Other clients, such as for example, Yandex Mail on Android, just lets you see messages normally (visible text on dark background).

For example, you can take a mail from gitlab failed pipeline. In kmail you just cannot change background (even with "Do not change color from original HTML mail"), because I think they hardcoded the background.

Another example is mail from youtrack bug tracker. I guess they do not hardcode the background color, but do hardcode font colors. In Kmail, the dark mode (i.e. chackbox "Do not change html" is off) is unreadable, but in yandex mail it is perfectly fine.
Comment 11 Andrew Shark 2023-10-03 08:43:04 UTC
Can we make at least dumb solution to let the user just invert colors of message? Similar to Meta+Ctrl+U effect, but applied only to message area? Yes, it will also invert images, and some fonts may be not of expected (by designer) color. But the message at list will not blind you, and it will be easily readable.
Comment 12 Raúl 2023-12-05 20:22:17 UTC
I have tried the suggestion from https://bugs.kde.org/show_bug.cgi?id=414100#c7 and I see it as a workaround. Thanks Christophe!