- From: Isaac Muse via GitHub <sysbot+gh@w3.org>
- Date: Thu, 05 May 2022 18:47:56 +0000
- To: public-css-archive@w3.org
facelessuser has just created a new issue for https://github.com/w3c/csswg-drafts: == Should premultiplied undefined alpha make other color components undefined? == Reading over the spec, it seems that if the alpha component is `none`, that all the associated color components will also become `none`. This seems unintuitive (at least to me). To me, it would seem that premultiplication should not be performed if alpha is `none`: ```py >>> Color('color(srgb 1 0 0 / 0.5)').mix('color(srgb 0 0 1 / none)', space='srgb') color(srgb 0.5 0 0.5 / 0.5) >>> Color('color(srgb 1 0 0 / 0.5)').mix('color(srgb 0 0 1 / none)', space='srgb', premultiplied=True) color(srgb 1 0 0 / 0.5) ``` I guess, what I expected to happen was for it to behave as if premultiplied was disabled, because how can you premultiply if you don't know by what to premultiply? This would just take alpha out of the calculation. ```py >>> Color('color(srgb 1 0 0 / 0.5)').mix('color(srgb 0 0 1 / none)', space='srgb') color(srgb 0.5 0 1 / 0.5) >>> Color('color(srgb 1 0 0 / 0.5)').mix('color(srgb 0 0 1 / none)', space='srgb', premultiplied=True) color(srgb 0.5 0 1 / 0.5) ``` There may be reasons for this, but I am curious if there is something driving this decision, or if maybe it just wasn't considered. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7253 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 5 May 2022 18:47:57 UTC