Re: [csswg-drafts] [css-color-3][css-color-4] why opacity is applied on premultiplied color ? (#7640)

> My question is not "where did I make a mistake ?",

Apologies, I probably should have read better. You are correct, your values are identical.

> My question is: Does the calculation I show correspond to the "theory",
and if so, why the "opacity" property is applied on the premultiplied color.

I would argue the color returned by composing the two divs isn't premultiplied anymore, as the resultant color is the combined color. The premultiplication already occurred to apply the weight to each color creating the resultant. In the example I demonstrated, the result of each step of the composition was fed back through with the next layer treating each color as if they were not premultipled. The end result was the same.

What I'm not quite following is the premultiplying the opacity to the resultant, and the modification of the composition. Though it does seem to give the same value, at least in this case. It seems to combine some steps, which alters the end equation slightly. Does this hold true with more complex cases?

I'd have to work through the math to see if why this working out. Maybe someone with more experience in this area will have an answer.

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


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

Received on Wednesday, 24 August 2022 21:28:27 UTC