W3C home > Mailing lists > Public > www-style@w3.org > April 2009

Re: Automatic scheme: dark or light

From: Pascal Germroth <pascal@germroth.name>
Date: Tue, 28 Apr 2009 21:48:00 +0200
Message-ID: <49F75D70.3040504@germroth.name>
To: adderek.pl+SPAM@gmail.com
CC: www-style@w3.org
Hello,

> 1) Standardized (!) way of telling whether given style is
> light-on-dark or dark-on-light

I don't think that's really necessary. The user-agent could for example
render the page with every alternative stylesheet chosen into an
invisible buffer and, by creating a histogram guess if the background is
dark. (Since most pixels are background pixels, finding the desired
background should be easy.)
Or, render text & other things into different buffers, and compare the
average colors... (although maybe text is in pixel images etc... But
that's bad style anyway)

This would be more flexible than a simple "dark/light" declaration in
the stylesheet, so users could define a completely custom histogram, for
example, "low on green, text blueish", and have the best matching
stylesheet selected.  Also for accessibility, one might not want to
select the stylesheet that relies heavily on red/green separation, but
instead choose the green/blue one.


-- 
pascal
Received on Tuesday, 28 April 2009 19:48:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:46:58 GMT