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

Re: [css3-images] A specified algorithm for premultiplied gradients

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 7 Dec 2010 06:00:10 -0800
Message-ID: <AANLkTinxobmFZLY=Du8wnN_S6uKZvL30FBeS05WRJBdZ@mail.gmail.com>
To: Leif Arne Storset <lstorset@opera.com>
Cc: "www-style@w3.org" <www-style@w3.org>, Fredrik Söderquist <fs@opera.com>
On Tue, Dec 7, 2010 at 5:58 AM, Leif Arne Storset <lstorset@opera.com> wrote:
> Tab Atkins Jr. <jackalmage@gmail.com> skreiv Tue, 07 Dec 2010 14:51:01 +0100
>
>> On Tue, Dec 7, 2010 at 5:42 AM, Leif Arne Storset <lstorset@opera.com>
>> wrote:
>>>
>>> The color stop section [0] of the gradients spec currently reads:
>>>
>>>> Between two color-stops, the line's color is linearly interpolated
>>>> between
>>>> the colors of the two color-stops, with the interpolation taking place
>>>> in
>>>> premultiplied RGBA space.
>>>
>>> Our graphics people have requested that a specific algorithm be specified
>>> for this interpolation.
>
> .
>>>
>>> 0. http://dev.w3.org/csswg/css3-images/#color-stop-syntax
>
>> Sure.  Would something like this be sufficient?
>>
>> """
>> To transition colors in premultiplied space, first convert each color
>> to rgba() notation.  Then, convert each to a 4-tuple where the first
>> three elements are the red, green, and blue components multiplied by
>> the alpha, and the fourth element is the alpha.  Then, linearly
>> interpolate the respective components of these 4-tuples.  At each
>> point, the color expressed in the 4-tuple can be extracted back into
>> rgba() format by dividing the first three components by the alpha to
>> regain the red, green, and blue component.
>> """
>
> Turns out I misunderstood the graphics people, and we don't really need
> this. Personally, though, I wouldn't object to it being specified, so keep
> it if you like.

It might be good as a note, to let people understand what that means.
I'll add it.

~TJ
Received on Tuesday, 7 December 2010 14:01:04 GMT

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