Re: CSS3 Color: Interaction of opacity and rgba

On Thursday, July 24, 2003, 6:33:05 AM, Tantek wrote:

TÇ> On 7/23/03 5:44 PM, "REFSTRUP,JACOB (HP-Vancouver,ex1)"
TÇ> <> 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?

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

Yes, precisely.

The distinction is easier to see if you imagine a second tspan
nested inside the first, with different RGBA values and with opacity
not set.

p {opacity: 0.1}
span {color: rgba(100%,0,0,0.5)}
span > span { color: rgba(0,100%,0,0.8)}


Received on Thursday, 24 July 2003 19:32:11 UTC