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

Re: [CSS3-color] [css3-images] [css3-transitions] transparent transitions

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 28 Jun 2011 11:27:47 -0700
Message-ID: <BANLkTinhfXrTFMGatD1MEM9DSSo1dO_BnbCiCT4S4Y+Y6BpEiA@mail.gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: www-style@w3.org, Tantek Çelik <tantek@cs.stanford.edu>
On Mon, Jun 27, 2011 at 10:46 AM, fantasai
<fantasai.lists@inkedblade.net> wrote:
> On 01/12/2011 12:26 PM, Tab Atkins Jr. wrote:
>> What you're seeing is the fact that transitions from opaque colors to
>> transparent in non-premultiplied space get darker as they progress.
>> Try doing a transition from opaque white to transparent over a white
>> background, and you'll see it very clearly - you'll get an image that
>> starts white, darkens to gray, and then lightens to white again.
> Is there a way to avoid things like this? It seems to me that having
> 'transparent' mean 'transparent black' means you almost never get what
> you want, which is the opacity fading without the color itself changing.
> I think that's a common enough use case that it should be easy to do.

dbaron's got it - Image Values requires gradients to transition in
premultiplied space for precisely this reason.  Premultiplied
transitions are identical to non-premultiplied when you hold either
the alpha or the color steady, and they're generally more attractive
when both the color and alpha change at the same time.

Received on Tuesday, 28 June 2011 18:28:34 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 11 February 2015 12:34:54 UTC