has a 50% alpha (128), should the RGBA values store premultiplied colors (128,0,0,128) or non-premultiplied colors (255,0,0,128). There are advantages to both schemes. For example, if you’re using non-premultiplied colors, then you can change the opacity of an image simply by tweaking its alpha channel. Or if you want to perform some color correction, say remap bright red to some other color,
then you can do that without worrying that the alpha channel has made your bright red look like dark red simply because of transparency.
But if you’re using premultiplied colors, then the math of compositing images together is simpler and can avoid a division most of the time. The key to understanding this is to give up the idea of alpha as transparent colored glass
and instead see it as a screen mesh. So if your alpha is 50%, then imagine a pixel where half is covered by your pixel’s color and the other half is completely transparent.
Specifically, imagine the left half covered and the right half transparent:
