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

On Sun, Jul 10, 2011 at 6:19 AM, Alan Gresley <alan@css-class.com> wrote:
> What I am an trying to say is that a very large percentage of potential
> gradient transitions will never work if all gradients are forced to
> transition in premultiplied space.
>
> Please view this test in Firefox 5, IE10 preview 2 or a WebKit nightly.
> http://css-class.com/test/temp/color-transparent.htm
>
> Now please view the same test in Opera 11.50.
>
> Here are the screenshot for non Opera 11.50 UAs.
> http://css-class.com/test/temp/color-transparent.png
>
> Here are the screenshot for Opera 11.50.
> http://css-class.com/test/temp/color-transparent-opera11-50.png

I'm aware of the difference in how premultiplied and non-premultiplied
gradients render when you're changing both the hue and the alpha.
That doesn't change my or dbaron's point - the majority of cases where
you're transitioning to a transparent color, it will be to transparent
black, because that's the meaning of "transparent".  However, that
almost never looks the way you actually want, particularly when the
starting color is very bright.

If you really want the same effect as what you'd get going from yellow
to transparent blue in non-premultiplied space, you can manually curve
the gradient to get something close.  It's a little complex, but it's
also a niche case.  I'm more interested in making the 90% case work
right, which I believe I'm doing.


>> The problem is stated clearly in the quote that I was responding to
>> there: "having 'transparent' mean 'transparent black' means you almost
>> never get what you want... I think that's a common enough use case
>> that it should be easy to do.".
>
> How many transparent colors are there?
>  rgba(0~255, 0~255, 0-~255, 0.0)

That's irrelevant; the question you should be asking is how often
particular transparent colors are used.  rgba(0,0,0,0) is used vastly
more than any other transparent color, precisely because it has such
an easy name.

~TJ

Received on Monday, 11 July 2011 21:09:46 UTC