I would not expect the Pixel color to change at all. I think it would be more like adding a gray layer mask that makes the whole layer partly transparent the color you see is the result of blending. Create a new document fill the background with red. Convert to a normal layer 0. Lower the opacity. You do not see one color you see the transparency checkerboard blended in you see two red shades. Use the color sampler on the layer it will sample 255 0 0 red.
My question was purely theoretical. If you have two layers, say some text on the top layer, and a photo beneath, and you wanted the text to be semi transparent, you would lower the opacity of the text layer.
By enlarging the screen all the way, to 3200%, you see the individual pixels - be sure the pixel grid is on.
First set the text or top layer to 100% opacity, and in the example above, sampling one pixel with the eyedropper tool shows the rgb values of the text layer pixel. R=11
If you then hide that layer by clicking the eyeball, and, with the eyedropper,sample the exact same pixel of the picture underneath, you get the rgb values for it. R=195
Then turn the visibility for the text or top layer back on, and change the opacity to 80%, you get the rgb value for the pixel, as shown in the example. R=71
I was just wondering what the math is that photoshop uses to arrive at this value.
I was trying 80% of the R = 11 value plus 20% of the R=195 value, but that doesn't add up to 71.
Can anyone come up with the math that Photoshop uses?
So you want to know the displayed RGB, not the pixel values. The math is all public - for example in the PDF specification - and depends on the blend mode.
Afraid I cannot answer your question , but you might like to look up Dr Alvey Ray Smith who invented the alpha channel and co-founded Pixar. I can tell you the relationship between two pixels on separate layers is given by
where t=the transparency of the uppermost layer as a decimal(actually t is written alpha usually-hence the name alpha channel)
A is a pixel on the topmost layer and B is the corresponding pixel on the layer below.
So if the transparency is 70%
this means in the combined layers at 70% transparency the final pixel value consists of 70% of the top pixel value and 30% of the bottom pixel value. How that translates to RGB I cannot tell you
Photoshop's transparency (and PDFs) is much more complex than alpha channels, though I think it can work in an equivalent way. I definitely agree that a starting point is to forget the spurious idea that RGB values lie between 0 and 255. They are floating point numbers between 0.0 and about 1.0 in any colour science.
It depend on how many layers above and below are involved in the blending of the document pixel blending and the blending modes involved. Blending the layer composite view is very complex the math use depends on many things.