Re: [css3-images] Proposed Gradients changes

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 UTC