Pick Opacity from Layer

Hi,

I was wondering if there is a simple way to determine/pick the opacity of a given pixel on a layer. Let’s say I use an airbrush-type brush to draw a line which creates different amounts of opacity. Is there any way to to reconstruct the opacity value of a given pixel on that layer?

I can think of workarounds, but they would require a lot of additional work just to get the exact number value, which would be impractical for what I’m trying to do.

Thanks for any ideas/advice!

I’m not sure if I understand, but see if this is helpful:

As I understand they want the brush to paint in the same opacity that the pixel had where they sampled the color from. So basically when the alpha value of a pixel is at 50% change the brush opacity to 50% too. I don’t think there’s any way to do that automatically.

I did a simple experiment by creating a new file, very small, 50 x 50 pixels. Then I created two squares: one I painted black (A) and the other with a shade of gray (B). I duplicated the black square layer (C) and placed it just below the gray square. I want to know what opacity I should set the black layer to so that it becomes gray…

…so I reduce the opacity of the layer until it reaches a similar shade. I imagine you can do something similar to find out the opacity of the brushstroke.

I thought of something like that too, and that does work to solve the issue. Just a bit of a hassle sadly, but probably what I’ll resort too.

I was thinking that sampling opacity was a feature hidden somewhere in the color picker or something and I just couldn’t find it, but it seems that there isn’t a tool that does that. :confused:

The issue with sampling opacity is that opacity is not a property of the color you pick with the color sampler it is a property of the pixel on the layer or the setting on the brush, not of the selected fore/background color. You can not really pick opacity and practically reuse it with the brush unless maybe that brush has no variable opacity. It would have to then adjust the opacity of the brush but then you will get issues when you paint over something else (keeping your example from the airbrush) and the brush suddenly behaves different. Additionally you can sample colors for many other tools, some of them don’t even have opacity levels like the brush tool has but the color still has to work with them.

In Photoshop I used to see the Info palette… but I don’t remember if it itself provided information about this or if there was some other resource. Maybe Krita itself has some docker or lesser known resource that informs this (I don’t know…).

That is unlikely I believe (but may be wrong), because that resource would have to hold the information of any point on canvas to answer a question like the one here, so which opacity-value has point XYZ. At least it is not impossible.
I’m asking myself if @EyeOdin’s Pigment.O can answer this question with its ability to sum up the color covering percentage?

Michelist

1 Like

It’s not 100% perfect, but if you select the Color Sampler Tool (itself), you’ll see the Tool Options panel provides you with some options you can change. One of these options is the “Show colors as percentages”. Toggle that option on, by marking it. You may also want to set the tool to use “Sample Current Layer”, depending on whether you’re trying to get the transparency from a mark only on the active layer or from everything beneath it. With the settings correct, you should be able to tell what the transparency is of a color by the “Alpha” number provided as you use the Color Sampler Tool. In my example shot here, you can see that when I sampled the far-right black hue, it returned 29.8039. I made the mark with pure black at 30% Opacity.

2 Likes

I could add the option to pigmento to read it but I don’t think there is much of a point though. The transparency math is very warped in the canvas. I did a post explaining how it does not add up. so replicating the values would probably be very hard.

1 Like

Thanks for the many replies! This is what I was hoping to find, since I have pngs with unknown opacities that I just need to get close too, so a bit of inaccuracy is fine, and having it displayed in the color picker doesn’t require the work arounds at least

1 Like

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.