W3C home > Mailing lists > Public > www-style@w3.org > July 2003

Re: CSS3 Color: Interaction of opacity and rgba

From: Tantek Çelik <tantek@cs.stanford.edu>
Date: Wed, 23 Jul 2003 21:33:05 -0700
To: "REFSTRUP,JACOB (HP-Vancouver,ex1)" <jacob.refstrup@hp.com>, <www-style@w3.org>
Message-ID: <BB44AF6E.2B336%tantek@cs.stanford.edu>

On 7/23/03 5:44 PM, "REFSTRUP,JACOB (HP-Vancouver,ex1)"
<jacob.refstrup@hp.com> 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?

In short, yes.  The color is painted when and how you would any other color.
The entire element (with children, text and decorations already composited)
is then drawn/composited at the given opacity for that element.

Tantek
Received on Thursday, 24 July 2003 00:33:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:22 GMT