RE: CSS3 Color: Interaction of opacity and rgba [css3-color]

Thanks for addressing this topic. It brought up a few questions
for me as I read the related specification sections.

Jacob Refstrup wrote:

> > span {
> >   color: rgba(100%,0,0,0.5);
> >   opacity: 0.1
> > }
> >
> > Does both "alpha" values apply?

David Baron wrote:

> I don't think any change to the specification is needed.  It
> describes the two features independently, since they are in fact
> independent.

The two features could be considered independent, but they interact,
right?  That is, some compositing operation determines how to apply
the opacity to an RGBA color, and then how to apply the result to
the rendering so far.

More generally, it seems like clarifying what exactly the opacity 
property does might help. Currently, the spec says:

> Opacity can be thought of conceptually as a postprocessing operation.
> Conceptually, after the element (including its children) is rendered
> into an RGBA offscreen image, the opacity setting specifies how to
> blend the offscreen rendering into the current composite rendering.

Which doesn't seem quite right. The opacity doesn't say *how* to blend 
an element into the existing rendering, a "compositing" property would 
say how to do that [1]. The opacity property only specifies the fraction
of light penetration blocked by this element, right?

It seems like getting all browsers to look the same might also require
specifying the blending operation.  Perhaps that is specified in the
spec, but I didn't see it near the descriptions of opacity, rgba or
alphavalue.

[1] http://en.wikipedia.org/wiki/Alpha_compositing

regards,
Matt
--
Matt Bonner
Hewlett-Packard Company
 

> -----Original Message-----
> From: www-style-request@w3.org 
> [mailto:www-style-request@w3.org] On Behalf Of L. David Baron
> Sent: Monday, June 02, 2008 4:57 PM
> To: Refstrup, Jacob Grundtvig
> Cc: www-style (www-style@w3.org)
> Subject: Re: CSS3 Color: Interaction of opacity and rgba [css3-color]
> 
> 
> On Wednesday 2003-07-23 20:44 -0400, REFSTRUP,JACOB 
> (HP-Vancouver,ex1) wrote:
> > I had a question around opacity and rgba and their 
> interaction based on the
> > CSS3 Color module. Suppose the following style sheet:
> >
> > span {
> >   color: rgba(100%,0,0,0.5);
> >   opacity: 0.1
> > }
> >
> > Does both "alpha" values apply? I.e. would the text inside 
> a span render
> > with an effective opacity of 0.05 onto its parents element?
> 
> I managed to find this comment despite its lack of the string
> "css3-color" (which is in the spec's URL).
> 
> Both alpha values do apply (but through different mechanisms).
> 
> This is tested in the test suite:
> http://dev.w3.org/CSS/css3-color-test-suite/src/t32-opacity-of
> fscreen-with-alpha-c.xhtml
> 
> I don't think any change to the specification is needed.  It
> describes the two features independently, since they are in fact
> independent.
> 
> -David
> 
> --
> L. David Baron                                 http://dbaron.org/
> Mozilla Corporation                       http://www.mozilla.com/
> 
> 

Received on Thursday, 5 June 2008 16:43:49 UTC