[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: KHTML color scheme patch
From: Matthew Woehlke <mw_triad () users ! sourceforge ! net>
Date: 2008-06-27 18:18:54
Message-ID: g43auh$46o$1 () ger ! gmane ! org
[Download RAW message or body]
Conor W Sullivan wrote:
> Hi, where is the best place to discuss khtml issues? The following is a patch
> to kdelibs/khtml/khtml_part.cpp which simply sets the part's color scheme as
> being a generic black-on-white color scheme. This is because khtml often
> works with webpages that conflict severly with dark color schemes. I can add a
> system settings option to disable this is you like.
IMO forcing the color palette to ignore user settings is a major step
backwards (not to mention a huge u7y/a11y no-no). I would *much* rather
see khtml be smart enough to detect brain-dead pages and fix them... not
only for this issue, but to be honest, I'd like it to "fix" pages that
intentionally try to obfuscate text by making it, say, black-on-black.
KColorUtils::contrastRatio was created for exactly this sort of thing. A
quick fix is, assuming you know the background color, replace the
requested foreground color with KCU::tint(askedFG, ref) where "ref" is
black if KCU::luma(background) > 0.5 and white otherwise.
(Actually, I'd like to further see if the requested foreground is black
and no background was requested i.e. we're using the default, ignore the
foreground request and use the default foreground. Since this is how
most pages screw up anyway...)
--
Matthew
First time I've gotten a programming job that required a drug test. I
was worried they were going to say 'you don't have enough LSD in your
system to do Unix programming'. -- Paul Tomblin (from cluefire.net)
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic