Using web difficult with dark KDE theme

Bug #324398 reported by LarsIvarIgesund
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KDE Base
Unknown
Medium
kde4libs (Ubuntu)
Invalid
Low
Unassigned

Bug Description

Binary package hint: konqueror

I say "difficult" to be nice, but I consider this totally and utterly broken. I use one of the KDE 4 dark themes (Zion (Reversed)), and a very large portion of the Internet's web pages are more or less broken.

To reproduce, change to the theme mentioned (or Obsidian), and try to edit some of the fields in this bug report. This particular field is ok, but I can't see (without marking) what I wrote in summary and the chosen application field. In addition, I have no idea which radio buttons are checked (and on some pages which check boxes are checked).

Originally this only applied to Konqueror, such that I could switch to Firefox for my banking needs (I don't dare typing wrong there!), but recently Firefox decided to pick up the KDE theme too, and now internet is as broken there.

I am aware that the issue sorta is with the web pages out there, having authors to unimaginative to think that anyone could have dark themes, and thus account for that, but when such a large portion of the web is "broken", then _I_ think that it is the browser(s) that is broken.

At the _very least_ there needs to be an option such that I can choose not to use desktop theme on the web pages I visit. Even those that are readable/usable, usually are ugly with a theme they didn't expect. Some say it should be possible to create a css for this, but one can't expect users to do that! Also, according to the KDE bug report that I'll register with this report afterwards, it is mentioned that some form elements may still be overridden, making a css useless.

I was overjoyed by the thourough implementation of dark themes in KDE 4, and extremely saddened by the browsers doing the same. It is a major annoyment that I encounter at least once every hour of the work day.

Revision history for this message
In , N-charles (n-charles) wrote :

(*** This bug was imported into bugs.kde.org ***)

Package: khtml
Version: KDE 3.0.7 CVS/CVSup/Snapshot
Severity: normal
Installed from: Compiled sources
Compiler: Not Specified
OS: Linux
OS/Compiler notes: Not Specified

When you have the CDE color scheme or any KDE color scheme in which the foreground text color is White (or light) many pages are rendered with text white (And background white).

Easy way to reproduce:
- Set your color scheme to CDE.
- Start a new konqueror (starting a new one is important!)
- Go to one of the example sites below

Solutions:
- Enforce text color black
- Have an independent configuration for khtml colors

Examples:
http://developer.kde.org/
http://razor.sourceforge.net/

(Submitted via bugs.kde.org)

Revision history for this message
In , Kai F. Lahmann (kfl) wrote :

I remember to see a bug for the different problem (color: always black)....:)

Revision history for this message
In , RogerL (roger-larsson) wrote :

* CDE color scheme.
* kill all konqueror (including the preloaded)
* visit both web pages - black text on white where expected.
The bug was quite old... is this still a problem in 3.1.x?

Revision history for this message
In , N-charles (n-charles) wrote :

Those URLs have been fixed, try this one:
http://www.gothmetal.net/

Revision history for this message
In , N-charles (n-charles) wrote :

(wasn't logged in just now :)

Revision history for this message
In , RogerL (roger-larsson) wrote :

I see no white background on that site :-)
Can't reproduce it there with CDE colors - did you use other?

But I found another one:
  http://www.aftonbladet.se/
With CDE colors; background white, links yellow == unreadable

If I configure the same color preference in mozilla only links in
ads are yellow - links in body are OK.

Revision history for this message
In , Y-coolo (y-coolo) wrote :

*** Bug 81057 has been marked as a duplicate of this bug. ***

Revision history for this message
In , hackeron (hackeron) wrote :

I have a black on black problem when I set foreground to white and background to black:

ftp://81.86.159.146/mutt.jpg

Very critical problem for me -- has been around for years.

Revision history for this message
In , Y-coolo (y-coolo) wrote :

usual fix: user defined stylesheet, overwriting default background
  body { background-color: white; }

Revision history for this message
In , hackeron (hackeron) wrote :

Thats not a fix. That gets rid of background images on the websites, and makes many websites unviewable as well.

If a webpage sets the font to white and background to black or a dark image, and you override the background. You are left with white on white.

What I did is override the font colour to dark grey. So atleast if a webpage opens with black background, I can see the text in grey. -- But that has its own disadvantages.

Revision history for this message
In , Y-coolo (y-coolo) wrote :

why should background-color: get rid of background images? That's either a lie or a bug.

And yes, you need to include color: in your overwrite too.

Revision history for this message
In , hackeron (hackeron) wrote :

I cant remember the specifics, my laptop is being repaired atm and I'm using firefox on this temporary machine. But I think it wasnt body { background-color } but *{ background-color } -- I remember body { } wasnt enough for some sites.

Revision history for this message
In , Y-coolo (y-coolo) wrote :

*** Bug 76686 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dato Simó (dato) wrote :

This is also reported in Debian: http://bugs.debian.org/282146 [need to repeat here since #76686 has been closed, sorry].

Revision history for this message
In , Y-coolo (y-coolo) wrote :

*** Bug 57089 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Y-coolo (y-coolo) wrote :

Created attachment 8455
trying to fix

I played a lot with this patch and I'm still not convinced this is the right
thing to do. It fixes mutt.org and it makes sure web pages only defining a
background still show something reasonable.

But e.g. http://finance.yahoo.com/q/bc?s=NOVL looks like shit in CDE color
scheme, but there is nothing I can do about within reasonable efforts. The
only option I can offer is to disable following system colors. Try it out.

Revision history for this message
In , Dsolaz (dsolaz) wrote :

regarding comment #12, please see comment #7 for bug 76686, which (IMO) is NOT a duplicate of this one
If, once system settings are honored by khtml, some Yahoo page looks bad, then it's the page author's fault for not defining colors consistently. Bug 76686 is about honoring system settings, this one is about working around incomplete color settings in web pages.

Revision history for this message
In , Y-coolo (y-coolo) wrote :

the bugs are not independent of each other. #76686 happens because of incompletely following system colors. We used to follow only with foreground -> white/white and now we follow only with background -> black/black. My patch tries to fix this. But following system colors doesn't really help you as just too many web pages don't care.

Revision history for this message
In , Nix (nix-esperi) wrote :

That patch doesn't work for me: it references a function `setBaseColor()' which I can't find in the DocumentImpl or any superclasses in release 3.3.2 or in HEAD (and this bug is definitely still present in 3.3.2; I'm experiencing the `foreground colour in system colours not mapped to stylesheet' variant, with an added dash of all-user-stylesheets-ignored to make it even more aggravating).

What am I missing?

Revision history for this message
In , Y-coolo (y-coolo) wrote :

*** Bug 98533 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Y-coolo (y-coolo) wrote :

*** Bug 60555 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Leo Savernik (d2d3d9) wrote :

*** Bug 80062 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Alex Turbov (zaufi) wrote :

Another affected page (which is _ignore_ foreground color) of currently configured scheme: http://www.boost.org/libs/utility/enable_if.html
--
DAMN IT ALL! How long this nasty bug will be in KDE!!!!! 3.5.1 Still affected!!

Revision history for this message
In , 0-jamie (0-jamie) wrote :

Why not just expect that users will use a custom style sheet for Konqueror if they wish to change colors and only change SYSTEM colors, not Konqueror colors.

Personally, I'd rather have a page be legible and in the wrong color scheme. This seems like such a thorny issue to have (especially with so many badly written sites that specify a text or background color but not both) that it's not really solvable.

One more tip. If you DO run into a site where you just can't read it, hit control-A to select all. This will force the colors into the highlight scheme, which should be legible unless you screwed those up.

Also, (and this is what I did with the Dusky color scheme: http://www.kde-look.org/content/show.php?content=7832 ) make the default text color a medium color -- not light or dark. That way you'll be able to read it on either background. Of course, this is easier said than done, since you'll probably want to go closer to either light or dark. (reading text that has lower contrast than it should is somewhat challenging.)

Revision history for this message
In , Jmdavisprog (jmdavisprog) wrote :

Okay, it's a given that various sites are going to be poorly designed such that if you're using colors other than black text on a white background they are not going to look good. I'm unaware of any fix for this other than shooting all of the web developers who do that (but for better or worse that's not legal....).

The main problem I see is what was reported in bug #76686 (which was unfortunately closed and marked as a duplicate of this bug). Konqueror does not follow the system colors when no colors are specified by the web page. I have a dark blue background with light blue text as my system colors, but I consistently get black text on my dark blue background on web pages where the person who designed the page did not specify the color of either the text or the background.

If Konqueror is going to set the background to match my background when the background color isn't specified by the page, why isn't it also using my text color when the page doesn't define the text color? Either it should ignore the system colors entirely (not desirable) or it should use the system colors when the page doesn't define the colors.

Revision history for this message
In , nonadrift (news-muppet) wrote :

Why can't konqueror just do what I tell it to?

If I want white text on a black background that's what I should get, unless the page itself overrides. If the page is badly written it will show, and that is the fault of the web author, and not the responsibility of konqueror.

If you want to work around that, add a config option for using either (1) the system colours or (2) special fg/bg colours for web pages. Maybe also a check box in (1) for 'except when the page specifies only one of fg+bg'. That way I can at least have the rest of my kde apps look how I want (without having to use firefox for web browsing!). Other browsers have done this for years now.

I tried hacking the source myself, but I just got totally lost in all the framework gubbins and couldn't see what was actually going on.

Revision history for this message
In , Leo Savernik (d2d3d9) wrote :

What's actually impeding the Right Way (tm) to solve this problem? Hardcode
black on white by default (ignoring colour scheme) to make the internet
experience for the typical user as seamless as possible, and provide the
option to use system colours as done by Coolo's patch.

I really can't understand why *by default* we hardcode one colour (fg) but
leave the other one (bg) to be defined by the underlying colour scheme.

Revision history for this message
In , 0-jamie (0-jamie) wrote :

Workaround: you actually can force an override with a modified
accessibility stylesheet, but this IS still a bug.

richard missenden wrote:
[bugs.kde.org quoted mail]

Revision history for this message
In , Jure Repinc (jlp) wrote :

There are still problems with text and background colors in Konqueror KDE 4 RC2+. For example try to use the Obsidian Coast color scheme which is dark and visit many pages.

Revision history for this message
In , Congyi Wu (congyiwu) wrote :

I have a dark theme (http://www.kde-look.org/content/show.php/Tempered+Charcoal?content=67024) and I have black text on a dark background, even though the default text color should be white. I browsed through the khtml source and ended up finding a workaround that works for me:

KDE has base css files in /usr/share/apps/khtml/css/html4.css and
/usr/share/apps/khtml/css/quirks.css

Changing html4.css will change your default colors/layout, but web pages can still override your changes!

You can also copy html4 to your .kde directory instead of modifying it globally:

cd ~/.kde/share/apps/khtml/
mkdir css
cp /usr/share/apps/khtml/css/html4.css css

The section:
html {
        display: block;
        color: -khtml-text;
}
is responsible for the foreground text color. Somewhere in the khtml code, -khtml-text gets replaced by black. So if you want white text by default, just use color: white;

Further down in the css file are 2 more useful blocks:
@media print {
        body {
                display: block;
                margin: 0px;
        }
}

@media screen {
        body {
                display: block;
                margin: 10px;
        }
}

To get a white background change those blocks to:
@media print {
        body {
                display: block;
                margin: 0px;
                background-color: white;
        }
}

@media screen {
        body {
                display: block;
                margin: 10px;
                background-color: white;
        }
}

I kept my foreground text black and changed the background to white, and I haven't noticed any problems.

Revision history for this message
In , Santtu Pajukanta (santtu-pajukanta) wrote :

> ------- Additional Comment #26 From Leo Savernik 2007-04-20 17:33 -------
> What's actually impeding the Right Way (tm) to solve this problem? Hardcode
> black on white by default (ignoring colour scheme) to make the internet
> experience for the typical user as seamless as possible, and provide the
> option to use system colours as done by Coolo's patch.
>
> I really can't understand why *by default* we hardcode one colour (fg) but
> leave the other one (bg) to be defined by the underlying colour scheme.

I support this. One could argue it's the whole half of the Web that's broken with assuming everyone has black colours on white background by default and not setting the background colour along with the foreground, but it's a whole lot less inertia to fix (*cough*) Konqueror to act like other major browsers than to fix the Web.

Revision history for this message
In , Jure Repinc (jlp) wrote :

This is still a problem with Konqueror 4 from trunk (kdelibs r, kdebase r). Another testcase can be my simple website: http://jlp.holodeck1.com/

It is also a problem for us in KDE Edu. We're using KHTML part in Step physics simulator for contextual help and it is hard to read if a user uses a dark color scheme.

So I think the best solution for this would be to have all colors in KHTML part to follow the system color scheme so that it can look consistent when integrated into apps like Step. And then there should be an option to enable web compatibility mode for KHTML part so that web browsers like Konqueror could enable it and the background would be hardcoded to white and text to black.

Revision history for this message
In , Jure Repinc (jlp) wrote :

Oh forgot to add revisions in my previous comment: kdelibs r795429, kdebase r795176

Revision history for this message
In , Alan Braslau (alan-braslau) wrote :

I'm having a hard time accessing http://bugs.kde.org under konqueror!
Trying many different color schemes (including default), the text entry regions are not outlined so I have to guess (or remember) where they are, selection boxes are transparent unless I select or deselect them, etc.

I WANT to use konqueror, but many, too many websites are unusable so my patience is getting tried.

Revision history for this message
In , Tommi Tervo (tommi-tervo) wrote :
Revision history for this message
In , Nevyn-z (nevyn-z) wrote :

This is biting me for form elements using konqueror. dropdown lists and textboxes have black text on grey backgrounds. when using the obsidian color style.

KDE 4.0.84-1 debian svn 20080625

Revision history for this message
In , Heto (heto) wrote :

This bug is still present in 4.1.0, and effectively makes dark colour schemes like Obsidian Coast "broken".

I'd like to support the idea that Konqueror / KHTML should honour the system settings and have whichever colour I choose from the colour scheme. If websites or accessibility stylesheets want to override, then that's fine.

This really is a showstopper for anyone using a dark background.

Thanks.

Revision history for this message
In , Heto (heto) wrote :

Hi again, I just tried Congyi Wu's workaround to make my konqueror backgrounds white (which I really don't want to do, but it's the only thing to make it work right now, I guess), and I thought I'd add that you'll also need to replace all the instances of:

background-color: window;

with

background-color: white;

in the various form sections lower down the html4.css file. Otherwise, even this page looks terrible in Obsidian, as you're entering black text into a dark grey box to make comments :-/

HTH, but looking forward to a "proper" solution soon :-)

Revision history for this message
In , LarsIvarIgesund (larsivar) wrote :

Bug 170919 is probably a duplicate.

Revision history for this message
In , Alex Turbov (zaufi) wrote :

I just want post a link that still affected by this bug (some of them posted above are not valid already)
http://www.gnu.org/software/autoconf/manual/make/

Revision history for this message
In , Heto (heto) wrote :

Indeed.

BTW - I've made my html4.css available for download here:
http://www.petesodyssey.org/files/html4.css

...to be placed into ~/.kde/share/apps/khtml/css/ in order to work-around this bug for now and make pages readable.

Still hoping for a konqueror that does what it's told though... :-)

Revision history for this message
In , LarsIvarIgesund (larsivar) wrote :

(In reply to comment #40)
> Indeed.
>
> BTW - I've made my html4.css available for download here:
> http://www.petesodyssey.org/files/html4.css
>
> ...to be placed into ~/.kde/share/apps/khtml/css/ in order to work-around this
> bug for now and make pages readable.
>
> Still hoping for a konqueror that does what it's told though... :-)
>

This is well and fine enough for the background, but do still not handle the serious issues referred to in my post in Bug 170919 which relates to the colours used in themed widgets (the biggest problem is forms, but for instance black scrollbars (like I see in this particular form) just look ugly when the page was designed with light widgets in mind.

Revision history for this message
In , Heto (heto) wrote :

Hmm... something seems to have changed at least in 4.1.3 or later.

BTW, I've noticed from my playing around with the html4.css that I don't seem able to override the text colour for text input areas any more. They seem to be hard-coded as view-text, though the background isn't. Can someone confirm that khtml overrides html4.css with text colour for text input form items?

Thanks.

BTW, there's a really easy way of seeing this brokenness in action- select obsidian coast as a your scheme, then try to write a comment on this very page :-(

Revision history for this message
In , Chusty (chusty) wrote :

http://www.ridingwithrobots.org/blog/?p=1616

This is the site that is pointed by the plasmoid ridewithrobots. It is all black.
If I go to File/open with Konqueror/kde3 it works OK. The same with Firefox.
It seems to be the same problem. If not I will start another bug report.

Changed in kdebase:
status: Unknown → Confirmed
Revision history for this message
LarsIvarIgesund (larsivar) wrote :

Here is a screenshot from a LP page - the Summary field is actually full of text.

Changed in kdebase-kde4 (Ubuntu):
status: New → Confirmed
Revision history for this message
Tom Wright (tom-tdwright) wrote :

I'm affected by this bug too. Except unlike LarsIvarIgesund, all my form element have turned black, with white text. (I use Obsidian theme.)

This is more usable than LarsIvarIgesund's problem (I can see my text), but it's really ugly.

Additionally, I've found that this colouration cannot be overridden for radio or checkbox elements. I've made a simple test case which demonstrates this: http://binary-star.co.uk/internal/form-test.htm

For comparison, I've attached a screenshot of what that test looks like on my system in firefox.

Revision history for this message
humufr (humufr-deactivatedaccount) wrote :

Same problem with kmail where the font color is not change between the clear and the dark theme so the new message are in blue very difficult to read on a dark background.
The theme are buggy because there are no change for the font color I think.

affects: kdebase-kde4 (Ubuntu) → kdebase (Ubuntu)
description: updated
Changed in kdebase (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Low
Revision history for this message
In , FiNeX (finex) wrote :

*** Bug 170919 has been marked as a duplicate of this bug. ***

Revision history for this message
In , FiNeX (finex) wrote :

*** Bug 200253 has been marked as a duplicate of this bug. ***

Revision history for this message
In , FiNeX (finex) wrote :

*** Bug 203797 has been marked as a duplicate of this bug. ***

Revision history for this message
In , FiNeX (finex) wrote :

*** Bug 175922 has been marked as a duplicate of this bug. ***

Revision history for this message
In , FiNeX (finex) wrote :

*** Bug 172534 has been marked as a duplicate of this bug. ***

Revision history for this message
In , FiNeX (finex) wrote :

*** Bug 160165 has been marked as a duplicate of this bug. ***

Revision history for this message
In , FiNeX (finex) wrote :

*** Bug 53885 has been marked as a duplicate of this bug. ***

Revision history for this message
In , FiNeX (finex) wrote :

*** Bug 207875 has been marked as a duplicate of this bug. ***

Revision history for this message
In , FiNeX (finex) wrote :

Look bug #207875 for some additional details.

Revision history for this message
In , Cgiboudeaux (cgiboudeaux) wrote :

*** Bug 207906 has been marked as a duplicate of this bug. ***

Revision history for this message
In , ArneBab (arne-bab) wrote :

I just found this bug when I wanted to post one for the topic myself.

I would prefer to have an option to override the default text color of websites which don't supply a custom background color.

I'm also browsing with dark background, and I don't want Konqueror to break my theme (theme: http://draketo.de/licht/freie-software/kde/kde-433 ).

I didn't realize until I found this bug that the websites didn't supply a default text color - I assumed they defined black for text.

So the straightforward solution I see is to make Konqueror honor my colorscheme - I set it for a reason, after all.

The complex solution would be to honor the colorscheme, but to have an option to make Konqueror check for each custom text color if its contrast to the according background is high enough, and to use a color with more contrast if the custom color isn't visible/readable.

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Hi there!

Thanks for reporting this bug! Your bug seems to be a problem with the KDE program itself, and not with our KDE packages. But don't worry! This issue is being tracked by the KDE developers at: http://bugs.kde.org/show_bug.cgi?id=47320
Once fixed in KDE, it will be included in Kubuntu once the KDE version the fix is in in reaches Kubuntu.

Thanks!

affects: kdebase (Ubuntu) → kde4libs (Ubuntu)
Changed in kde4libs (Ubuntu):
status: Triaged → Invalid
Revision history for this message
In , Peyotll (peyotll) wrote :

Why is there black themes in KDE if we can't use them???
I tried obsidian theme and can't go back now, I really love It.
I hope that bug will be corrected.

Revision history for this message
In , Trouble (trouble) wrote :

This bug still exists. As a workaround for dark-background lovers, you can edit

/usr/share/kde4/apps/khtml/css/html4.css

and replace

color: -khtml-text;

with

color: white;

This will affect all users on the machine, though, so a real fix is still needed.

Revision history for this message
In , Michael Tsang (miklcct) wrote :

This bug STILL exists in 4.4.5! I have to use a custom stylesheet to override it.

Revision history for this message
In , Alex Turbov (zaufi) wrote :

(In reply to comment #57)
> This bug STILL exists in 4.4.5! I have to use a custom stylesheet to override
> it.

Yep! Its about 7 years old bug!! Anniversary coming soon :)

Revision history for this message
In , Samuel-brack (samuel-brack) wrote :

Updated it to version 4.4.5

Revision history for this message
In , Michael Tsang (miklcct) wrote :

I think that the best is to follow the system settings for background, text and links in terms of colour, font and size unless the page overrides it.

Changed in kdebase:
importance: Unknown → Medium
Revision history for this message
In , Tommi Tervo (tommi-tervo) wrote :

*** Bug 226437 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Tommi Tervo (tommi-tervo) wrote :

*** Bug 273630 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Christopher Yeleighton (giecrilj) wrote :

My solution:

BODY { COLOR: WINDOWTEXT } :LINK { COLOR: AQUA }

Revision history for this message
In , Christopher Yeleighton (giecrilj) wrote :

(In reply to comment #29)

> KDE has base css files in /usr/share/apps/khtml/css/html4.css and
It is at /usr/share/kde4/apps/khtml/css/html4.css

Revision history for this message
In , Christopher Yeleighton (giecrilj) wrote :

It also turns out that Konqueror ignores any custom styles for TEXTAREA.
Moreover, the custom style sheet is not applied in WebKit mode and I still get black on dark there.

Revision history for this message
In , Christopher Yeleighton (giecrilj) wrote :

(In reply to comment #65)
> It also turns out that Konqueror ignores any custom styles for TEXTAREA.

As weird as it sounds, TEXTAREA got updated after restart.

Revision history for this message
In , Christopher Yeleighton (giecrilj) wrote :

(In reply to comment #63)
> My solution:
>
> BODY { COLOR: WINDOWTEXT } :LINK { COLOR: AQUA }

Unfortunately, putting those declarations into custom CSS for Konqueror does not affect the display of embedded documents such as Ark Preview.

Revision history for this message
In , Tommi Tervo (tommi-tervo) wrote :

*** Bug 169701 has been marked as a duplicate of this bug. ***

Revision history for this message
In , 0-info-h (0-info-h) wrote :

Created attachment 86145
Patch to use theme's text color unless page's css selects otherwise

This patch uses the theme's foreground color for text, unless the displayed page defines another textcolor. It fixes display of basic HTML pages without any stylesheet yet links are IMHO still too dark and probably need the same fix.

Since there are pages in the web which set textcolor but no background (apparently simply relying on the assumption that such pages are displayed with a white background a more complete patch could examine a page, try to figure if textcolor is set, while background is not and in that case switch to white background.
Or, even simpler, use white background as default and leave textcolor as-is (and annoy users with black color background themes ;) ).

Changed in kde-baseapps:
status: Confirmed → Unknown
Revision history for this message
In , Michael Tsang (miklcct) wrote :

This still exists in KDE 4.14.1 as in 2014! More than 12 years already!

Revision history for this message
In , Michael Tsang (miklcct) wrote :

Created attachment 91374
Improper default colour in Konqueror

This shows the improper default colour in KDE. I am using the produkt colour scheme, but both rendering engine does not get all the colours right, leaving some unintelligible combination.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.