8

I opened a PNG containing an alpha channel in Photoshop and wanted to get the opacity / alpha of a given point in the PNG file, so that I could match that opacity in a new photoshop layer. How can I do this? is there any way to get an alpha value at a point the way the color sample tool gives RGB values at a given point?

3 Answers 3

21
  1. Open the Info palette
  2. Click on the palette option in the top right corner and choose Panel Options...
  3. Where it says "Second Colour Readout", choose Mode: Opacity
  4. Hit "OK"

In the info palette it will now tell you the opacity level of wherever you put the mouse.

2
  • Perfect! I knew there was a way to do this.
    – Josh
    Mar 30, 2010 at 23:51
  • Hmmm. I am getting 100% which is plainly incorrect as I can see the underlying layers through the area I am sampling. It feels like 10%. What could I be doing wrong?
    – MSC
    Oct 22, 2015 at 21:06
0

If there is a portion of your image that contains 100% of a color, and your alpha section contains < 100% of that same color, you can do it. For example, if you have a gradient from 100% color to 0% color, with alpha transparency, here's what you do:

  1. Open gradient transparency file in Photoshop. It should be layer 0.
  2. Make a copy of layer 0.
  3. Using the move tool, move one layer to the left, the other to the right, so that there is gap between them.
  4. Add a background layer and fill it with white. You should now have 2 gradients on a white bg.
  5. On the original layer 0, place color sampler #1 at the point on the gradient that you want to measure for opacity. The color at that point will show in the info palette.
  6. On the layer 0 copy, place color sampler #2 at the point where the gradient is 100% color. The color at that point will also show in the info palette.
  7. Make sure that the color samplers each show a different value.
  8. On the layer 0 copy, begin to lower the opacity, and then use the arrow keys (on kb) to lower the opacity in 1% steps. Lower it until the color sampler values match. Now read the opacity of the layer. This should be the opacity at point you are testing for, provided the base colors are the same.

Note that you need the colored background. If you turn off the bg, you'll notice that the color samplers will read the same for your gradient. Give it a try. This is the reason for step #7. I don't know that this will work if the colors are not the same, or at least very close to get you in the ballpark.

0
  1. Make solid white layer upon solid black one;
  2. CTRL + click on layer with your iamge. It will make selection based on its opacity;
  3. Select white layer and click "Make mask" button (under layer stack). It will make mask from your selection;
  4. Profit! Simply use color picker on that point - any color in RGB will show you that point's alpha on your image;

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .