If I have a bottom layer color and an alpha value (C&A) and want to create a custom C&A on the screen, what is the function to determine what C&A has to be added as a layer on top of the bottom layer?
edit:
I want to duplicate photoshop's "normal" mode so that I match a designer's graphic design.
For example:
BASE LAYER rgb: 255-0-0 alpha: 51/256
+
NEW LAYER rgb: ??? alpha: ???
=
DESIRED LAYER rgb: 114-0-141 alpha: 92/256
P.S.: the answer is 0-0-255 alpha: 51/256... but I only know this because I wrote the problem and verified it in photoshop.