Re: [css3-images] Proposed Gradients changes

On 24/11/2010 12:00 PM, Tab Atkins Jr. wrote:
> On Tue, Nov 23, 2010 at 4:41 PM, Alan Gresley<>  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.

Really! What about on a display devices that uses scRGB? Mapping colors 
from scRGB into sRGB will cause the start of the transition to be within 
the sRGB gamut. Is this what we desire with scRGB displace devices?

> 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).

CSS doesn't have to define how it's done. A display device that only 
shows a sRGB gamut will clamp  (-20,270,250)  to  (0,255,250). I'm 
talking about what happens along a gradient in a display device that 
support a scRGB gamut.

>> 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?

Yes I do. I expect the gradient to end (become an imaginary color) 
before the end point of the gradient but the degree that this happens is 
greater if premultiplied gradients are implemented. It may do likewise 
for un-premultiplied gradients.


Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo

Received on Wednesday, 24 November 2010 01:40:50 UTC