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

Re: [css3-images] Proposed Gradients changes

From: Alan Gresley <alan@css-class.com>
Date: Thu, 25 Nov 2010 14:56:03 +1100
Message-ID: <4CEDDE53.3080907@css-class.com>
To: Chris Lilley <chris@w3.org>
CC: "Tab Atkins Jr." <jackalmage@gmail.com>, Anne van Kesteren <annevk@opera.com>, Brad Kemper <brad.kemper@gmail.com>, www-style list <www-style@w3.org>
On 25/11/2010 3:37 AM, Chris Lilley wrote:
> On Wednesday, November 24, 2010, 2:40:14 AM, Alan wrote:
> AG>  On 24/11/2010 12:00 PM, Tab Atkins Jr. wrote:
>>> 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.


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

So why doesn't CSS3 color say this? The way the spec is written, there 
is nothing that indicates that author can use deep color like scRGB. 
Also, this doesn't answer my initial question regarding gradients.

At what point does the below gradient use imaginary colors of the scRGB 

background: linear-gradient(left, rgba(-20, 270, 250), transparent);

If a gradient was premultiplied at some point it could be using 
imaginary colors. If a gradient was un-premultiplied it may use real 
color along it whole gradient.

I can not answer this myself since there is no CIE colorspace that maps 
color to a x, y and z matrix and I'm am ignorant if any browser can show 
scRGB color. I will just have to search my house for my HDMI cable 
instead of VGA cable.

Alan http://css-class.com/

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo
Received on Thursday, 25 November 2010 03:56:43 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:41 UTC