Skip to main content
Known Participant
April 27, 2024
Answered

Photoshop action to apply area determined by selected color range to layer mask

  • April 27, 2024
  • 1 reply
  • 430 views

Hi

 

I have a Photoshop action that creates an adjustment layer, inverts the mask, selects a color range, and fills the selected area of the layer mask with white.

 

By default, Photoshop fills the entire layer mask with white if the color range is not found.  I’d like to leave the mask black if the selection is empty.

 

Similarly, if I create a new layer via copy, Photoshop copies the selected pixels if the color range is found and copies the entire layer if the color range is not found.

 

What’s the correct way to set up this action so that the mask only reveals pixels if the color range is found in the image?

 

Or can I create a new layer that is only filled with pixels of the selected color range, and apply that image to the layer mask?

 

Thanks!

This topic has been closed for replies.
Correct answer r-bin

Try using "Insert Conditional..."

 

 

1 reply

r-binCorrect answer
Legend
April 27, 2024

Try using "Insert Conditional..."

 

 

Rip321Author
Known Participant
April 29, 2024

Thanks..  I figured out another way to do this.  Instead of inverting the mask, I inversed the selection and filled the mask with black.  When the selction is empty the mask is filled with black.

D Fosse
Community Expert
Community Expert
April 30, 2024

Actually, it's much simpler if the action creates the selection first, then the adjustment layer.

 

Then the selection will be automatically applied to the mask.

 

If that sequence is possible, of course.