Re: [css3-images] Proposed Gradients changes

On Wednesday, November 24, 2010, 2:40:14 AM, Alan wrote:

AG> On 24/11/2010 12:00 PM, Tab Atkins Jr. wrote:
>> 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.

AG> Really! What about on a display devices that uses scRGB? Mapping colors
AG> from scRGB into sRGB 

At no point in CSS processing are colours in a device gamut mapped *into* sRGB.

Once the colours are calculated, if the display is calibrated then the colours can be mapped *from* sRGB into the device gamut.

AG> will cause the start of the transition to be within
AG> 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. 

Yes

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

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

Tab already gave the answer to this question.

If the sRGB value (-20,270,250) falls within the device gamult it will be displayed, otherwise it will be clipped so that it falls inside the device gamut.

-- 
 Chris Lilley   Technical Director, Interaction Domain                 
 W3C Graphics Activity Lead, Fonts Activity Lead
 Co-Chair, W3C Hypertext CG
 Member, CSS, WebFonts, SVG Working Groups

Received on Wednesday, 24 November 2010 16:37:23 UTC