How to Quickly & Easily Invert a Layer Mask in Adobe Photoshop
I have a real problem with remembering which way gradients are created. To this day, for some reason, I can’t memorize which color will end up on either side. I think it possibly might have to do with having twice the amount of variables that I usually have in these types of situations. I’ll explain what I mean below.
In today’s post, I’m going to give you one super helpful tip for flipping a gradient around inside of Adobe Photoshop, so it ends up being the opposite of what you initially drew. If you’re anything like me, you have your foreground and background colors all picked out and when you pull that little gradient snapper string and let go, you are disappointed. I’m willing to say that 50% of the time you get it right and the colors are where they’re supposed to be and the other 50% of the time you have it backwards. Below, I’ll show you how to quickly remedy that situation without having to draw a new gradients. After all, setting up the gradient perfectly is a challenge to begin with. Having to do it all over again just because the colors are backwards is a real pain in the side.
I’d like to stay true to form in this post, so to explain how you can flip a gradient, I’ll use a few example images. And to make things even better, the gradient will be in the way of a layer mask. You’re going to love it, so read on. There’s nothing better than squeezing multiple lessons into one.
I thought I’d show you the photographs I’ll be working with for this post. Both of these photos are full size and I decided to post both of them below.
Combining the Images into One Tab
I’ve already gone ahead and opened up both photos into Photoshop. Currently, they are situated in their own tabs. I’v also resized both images so they have equal dimensions. This is important to do first because transforming one of them later on isn’t ideal.
To move one of the images into the other tab, I’ll click and drag the first image layer from the Layers
panel up to the second image file’s tab. From there, I’ll wait just a second or two until the second tab’s contents appear and then I’ll continue to drag the layer down into the workspace. Once it’s there, I’ll drop the layer, which will create one tab with two layers inside of it. These two layers belong to each image. Here is the current setup.
Adding a Layer Mask
My goal with this image is to make the top layer fade out so only half of it is showing on top of the bottom layer. I basically want a soft fade effect that blends both images together. Don’t worry so much about how the final outcome looks (what the actual photos themselves look like). Focus on the method here. You can use the method with for own projects, once it’s understood.
To add a layer mask, I’ll first click on the top layer in the Layers panel to select it as the one I’ll be adding the mask to. Then, I’ll head down to the bottom of the Layers panel and click on the Add Layer Mask
icon. This will add the mask to the layer I selected earlier. You can see the mask in this next screenshot, sitting to the right of the layer thumbnail.
As you can see, the mask is currently white. That means that it will allow everything to be “revealed” in that layer. If I were to paint any area of the mask with black, the area of the photo I paint would be hidden. To illustrate, I’ll click on the white mask in the Layers panel. Then, I’ll use a large brush and paint an area of the photo black.
Take a look at the white mask thumbnail now. There’s a large black area in it. That black area contains the area of the associated layer that’s now hidden from view. With that area hidden, the layer beneath it should now show. Let’s take a look at the entire image.
Okay, I’d say that’s pretty clear.
The reason I bring this up is because, for some reason, masks are confusing. There are many editors out there who shy away from them because they find the concept challenging. Really though, once you play around with them for a while, they’re as easy as pie.
Now that we know that adding black to a mask can “hide” an area, we can transfer that same concept to the use of a gradient. If I make a black gradient that transitions into a white one, that should hide part of the photo and reveal the rest. Right? And the fact that I’m using a gradient should give me the soft transition I’m looking for.
Adding a Gradient Mask
To fix the big black hole I just put in the image, I’m going to click on the mask thumbnail again, select the entire image with the Rectangular Marquee Tool
), right-click inside of the selected area, choose Fill
from the menu that appears and then select White
from the Contents
drop-down in the Fill
dialog box that pops up. Doing that will fill the entire mask with white again and will give me a fresh start.
At this point, I’m ready to add the gradient. I’ll go down to the Foreground
color pickers and make sure that one is set to white and one is set to black.
Next, I’ll select the Gradient Tool
, which is currently inside of a fly-out in the twelfth position down in the left vertical toolbar.
The way the Gradient Tool works is like this; one point on the gradient is one color that I picked earlier. The other point on the gradient is the other color. The gradient itself is comprised of a blend of those two colors. With this in mind, we should see white, black and some gray blend.
After selecting the tool and after making sure the layer mask thumbnail is still selected, I can pick a spot on the left side of the photo, click, and drag to a symmetrical position on the right side of the photo. Once there, I can let go and the gradient will be created inside of the mask. Let’s see what things look like after I do this.
If I look at the layer mask thumbnail, I can surely see the gradient. Now, let’s see what the image itself looks like.
I can see that the gradient itself has been properly created, but the only problem is that it’s backwards. I guess I should have clicked on the right side of the photo first and then dragged the tool over to the left side.
This error has brought up the entire point of this post.
How was I supposed to know which color was going to end up where? Also, how was I supposed to know the gradient was going to end up like this? To fix this problem and to reverse the gradient, I guess I could swap the black and white colors down in the color picker. Or, perhaps I could draw the gradient in an opposite fashion than I just did above. Whichever way I choose, I’m still going to have to go into the History
panel and undo my last action. Then, I’m going to have to perform the operation again and hope it’s as good as the last time I did it. What if I already had it perfect? This is a real bother.
Inverting a Layer Mask in Photoshop
Good think there’s a much easier way to fix this mess and luckily, it’s super easy. To reverse a mask, all I need to do is to invert it. So, making sure the mask thumbnail is still selected over in the Layers panel, I can head up to the Image > Adjustments > Invert
menu item and click.
After I do that, the gradient in the mask thumbnail will reverse itself and the gradient in the image will reverse itself as well. White will become black and vice versa. Let’s take a look at the photo now.
There we go. Now it’s perfect. What is it? I have no idea. It was merely an example, but the tutorial was successful.
How was that? I think tips like this are helpful because they can be applied to a number of situations. Anyway, I hope I clearly explained how to invert a gradient mask in Adobe Photoshop. If you have any questions or concerns regarding this post, please let me know in the comment section below. Thanks for reading!
: The way you know which will show versus hide is actually VERY easy. Think of black as hiding as in shadows hide. Think of white as light and light reveals. Hope that helps!