W3C home > Mailing lists > Public > www-style@w3.org > August 2011

Re: [css3-images] July F2F minutes comment regarding SVG and non-opaque colors

From: Alan Gresley <alan@css-class.com>
Date: Sat, 20 Aug 2011 12:00:01 +1000
Message-ID: <4E4F1521.5000109@css-class.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: Cameron McCormack <cam@mcc.id.au>, Brian Manthos <brianman@microsoft.com>, "www-style@w3.org" <www-style@w3.org>
On 20/08/2011 12:34 AM, Tab Atkins Jr. wrote:
> On Fri, Aug 19, 2011 at 2:58 AM, Alan Gresley<alan@css-class.com>  wrote:
>> Correction. Both Chrome and Safari 5.1 has no transparency of the color.
>> rgba(255,0,255,0) is treated like rgb(255,0,255). Chrome and Safari 5.1 only
>> works the same as the other UAs with stop-opacity:0 (as seen the the code
>> below).
>
> Yes, transitioning the opacity separately from the color is separate
> from the pre/post decision.
>
> ~TJ


No, the gradients are interpolated in post multiplied space (copy the 
code below and view in Chrome). There is no pre/post decision. The 
adding of the stop-opacity causes the gradient to interpolate the color 
in post multiplied space in WebKit (like what is seen with some CSS 
gradients in certain UAs).


<?xml version="1.0" encoding="utf-8"?>

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" 
height="200">
<g>
<linearGradient id="dummy" gradientUnits="userSpaceOnUse" x1="0" 
y1="200" x2="200" y2="0">
	<stop offset="0" style="stop-color:yellow;"/>
	<stop offset="1" style="stop-color:black"/>
</linearGradient>
<path fill="url(#dummy)" d="M0,0v200h200V0H0z" />
</g>

</svg>


-- 
Alan Gresley
http://css-3d.org/
http://css-class.com/
Received on Saturday, 20 August 2011 02:00:17 GMT

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