W3C home > Mailing lists > Public > www-style@w3.org > May 2004

Re: Colour gradient backgrounds.

From: Ernest Cline <ernestcline@mindspring.com>
Date: Mon, 17 May 2004 10:40:44 -0400
Message-ID: <410-220045117144044968@mindspring.com>
To: "Lachlan Hunt" <lachlan.hunt@iinet.net.au>, "W3C Style List" <www-style@w3.org>




> [Original Message]
> From: Lachlan Hunt <lachlan.hunt@iinet.net.au>
> To: W3C Style List <www-style@w3.org>
> Date: 5/18/2004 2:31:29 AM
> Subject: Re: Colour gradient backgrounds.
>
>
> Ernest Cline wrote:
> >>[Original Message]
> >>From: Lachlan Hunt <lachlan.hunt@iinet.net.au>
> >>
> >>I'm all for adding new types of colour properties and values to CSS, 
> >>but not at the expense of crossing *too far* into the realm of images. 
> >>For example, I have been thinking about for a while, but not yet 
> >>proposed, adding properties to do bitwise (NOT, OR, XOR and AND) 
> >>operations between colours and backgrounds which wouldn't use up
> >>much processing power at all, but haven't had time to write up a full 
> >>proposal. Maybe later this week I'll get around to it.
> >  
> > Well, I think that probably would go too far, largely because those who
> > would use such effects likely will be graphic professionals who would
> > likely be doing stuff better suited for SVG, Flash, or PDF, than using
> > the box model and CSS. This is not because it would be complicated
> > to program, but because it would be complicated for people to figure
> > out what they wanted from it.
>
> > Gradients don't have that problem. They are easy for both humans
> > and computers to grasp.
>
>    No, I disagree.  For gradients to be really useful to a designer, in
> all but the most basic cases, you would need to introduce additional
> properties to control the start, mid and end position's of the gradient. 
>   The *rate of change* may vary according to some kind of curve eg.
> sin wave, or even a bezier curve.  It may have more than two colours,
> or any other feature you can think of.  In all of these cases, a designer
> would need to resort to using images.

That would be way beyond what CSS should be expected to provide.
Once you get to that point you are reinventing SVG (or possibly even
going beyond it.) I think that basic linear gradients are sufficiently
useful
that including them in CSS would be appropriate.l

>    As for the bitwise operations I was thinking about, above, I may be 
> able to think up some use cases where such a feature would be useful, 
> but then the more I think about it, just like gradients, the same, or 
> more advanced visual effects could be done as just as easily with a
> background-image, and a foreground-image.

Actually, I can think of a major problem with CSS bitwise operations,
Bitwise with respect to what bits? CSS does not mandate a particular
number of bits per color channel, it doesn't even mandate that colors
use binary values.  Granted, a large part of the color module is geared
towards being easy to use when there are  256 values per channel, but
there is no requirement for a particular internal representation, and I
don't think it should be.  Yet for bitwise operators to be effective,
you would have to assume a particular internal representation.
So your aren't talking about adding four bitwise operators, but four
bitwise operators per color scheme that CSS references
Received on Monday, 17 May 2004 10:41:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:30 GMT