Re: [css3-images] Proposed Gradients changes

On Tue, Nov 23, 2010 at 11:54 AM, Chris Lilley <chris@w3.org> wrote:
> On Tuesday, November 23, 2010, 8:06:03 PM, Tab wrote:
> TAJ> I'm explicitly matching the behavior of Transitions, based on feedback
> TAJ> from Simon.  This also matches SVG by default, because SVG doesn't
> TAJ> composite alpha with their colors - they track and transition color
> TAJ> and opacity independently, so they don't have to worry about the issue
>
> That is partially true. SVG has to worry about it when people start using rgba or hsla on SVG gradient stops, or the value 'transparent' (which in CSS3 color means 'transparent black') on SVG gradient stops, or apply a CSS gradient and an SVG gradient on different, overlapping, elements.

Right, but when that becomes allowed, SVG can follow the existing
precedent.  My point was just that *existing* SVG practice matches the
experience of transitioning colors in premultiplied space.


> TAJ> (going from yellow to transparent in premultiplied colors is basically
> TAJ> equivalent to going from yellow;opacity:1 to yellow;opacity:0 in SVG,
> TAJ> modulo possibly some precision loss in the CSS colors).
>
> Yes. The precision loss is a real concern there; at opacity 0.5 (1/2) you have gone from 8 bits per component to 7; at opacity (1/16) you are down to 4 bits per component (only 16 distinct shades of red, green and blue). This causes hue shifts due to quantisation error.

Right, but isn't that shift too minor to care about in basically all
cases, since lower opacity means you're contributing less color
information in the first place?  I suppose that it could make a
noticeable difference if you're compositing a whole bunch of
low-opacity colors, but in normal usage it should be fine.

~TJ

Received on Tuesday, 23 November 2010 20:54:21 UTC