W3C home > Mailing lists > Public > www-style@w3.org > November 2010

Re: [css3-images] Proposed Gradients changes

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 23 Nov 2010 17:00:11 -0800
Message-ID: <AANLkTikP3nDGm57n+sQCcEQabQv6WWmeSanTtFf0eqp+@mail.gmail.com>
To: Alan Gresley <alan@css-class.com>
Cc: Chris Lilley <chris@w3.org>, Anne van Kesteren <annevk@opera.com>, Brad Kemper <brad.kemper@gmail.com>, www-style list <www-style@w3.org>
On Tue, Nov 23, 2010 at 4:41 PM, Alan Gresley <alan@css-class.com> wrote:
> This may be true for current display devices that shows a sRGB gamut but
> some display devices now can show scRGB. Also future displace devices may
> have much better gamma correction.
>
> I would like to ask you a simple question. At what point does the below
> gradient use imaginary colors of scRGB gamut?
>
> background: linear-gradient(left, rgba(-20, 270, 250), transparent);

The transition here is obvious and doesn't care what colors you are
specifying.  You just first map both colors into premultiplied color
4-tuples, which gives you (-20,270,250,1) and (0,0,0,0).  Then you do
a naive interpolation, and map the results back into sRGB.

Then, at actual value time, you map any colors outside your device's
gamut, if this is known, to colors inside the gamut.  CSS doesn't
define how this must be done, and so it is recommended that you only
use colors within the gamut defined by sRGB (that is, only colors with
components between 0 and 255).


> Or at what point along the gradient does it become transparent?

It becomes transparent at the very end, since you're transitioning
from a solid color to full transparency.  Why would you expect this to
be different?

~TJ
Received on Wednesday, 24 November 2010 01:01:07 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:34 GMT