Re: [csswg-drafts] [css-color-3] the 'opacity' property (#7605)

OK, here's an example to see if I understood correctly:
```
<div id="div1" style="background-color: rgba(22, 177, 200, 0.4); opacity: 0.7;">
 <div id="div2" style="background-color: rgba(100,200,50,0.5);"></div>
</div>
```
call:
Cs , as  :  rgba of the div2
Cb , ab  : rgba of the div1
co the resulting color of div2 on div1:
co = Cs **as * opacity** + Cb * **ab * opacity** * ( 1 - **as * opacity** )

co = (100/255, 200/255, 50/255) * 0.5 * 0.7 + (22/255,177/255,200/255) * 0.4 * 0.7 * (1-0.5*0.7)
I think that is correct?

-- 
GitHub Notification of comment by letochagone
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7605#issuecomment-1215759316 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 15 August 2022 20:30:52 UTC