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

Re: [css3-images] Proposed Gradients changes

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 23 Nov 2010 12:53:28 -0800
Message-ID: <AANLkTi=hKUZpeRm_yDWCRF9Qt0+LT8+qrD-L+JbON3We@mail.gmail.com>
To: Chris Lilley <chris@w3.org>
Cc: Anne van Kesteren <annevk@opera.com>, Brad Kemper <brad.kemper@gmail.com>, www-style list <www-style@w3.org>
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.

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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:41 UTC