- From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
- Date: Wed, 27 Nov 2024 22:23:45 +0000
- To: public-css-archive@w3.org
> More to the point, as long as what you're computing is a weighted sum of some sort (as is the case both for lerp and over), the two interpretations are the same. And indeed, the result is mathematically invariant to any affine transformation of the coordinates. Ah, you are indeed correct. I had to do some math to convince myself, but treating the alphas as a weighting of the *progress* does indeed give the same results as doing "actual" premultiplication, and then it's usable on affine coordinates as well. That is, at a given progress value `p`, if you instead calculate the "alpha-weighted progress" as `(p * ending-alpha) / (p*ending-alpha + (1-p)*starting-alpha)` (with special-casing for p=0 and p=1), and then just lerp with the adjusted progress, you'll get the exact same results on vector coordinate as you would doing normal premultiplication, and the progress can then be applied to your affine coordinates in the standard fashion as well, yielding the same sort of results. It even matches outside the 0-1 range (tho it does give silly results, it's the *same* silly results as "normal" premult gives). Reopening, then, to discuss if we *should* in fact be specifying this for colors in cylindrical spaces. -- GitHub Notification of comment by tabatkins Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11238#issuecomment-2504897442 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 27 November 2024 22:23:46 UTC