Getting Started with Layer Masks in Photoshop a Beginners Tutorial

Getting Started with Layer Masks in Photoshop – a Beginners Tutorial



Much of the power of Photoshop comes from its use of layers, which can best be thought of as transparency over your image. Layers have lots of benefits, like the fact that you can work on your image without affecting the pixels in the underlying image. But perhaps the most powerful aspect of layers, is your ability to affect exactly where, how, and how much of your changes will affect the underlying image. That is all done through layer masks. In fact, it might be fair to say that layers are really only effective because of layer masks.

What are layer masks? Think of them as filters that let you control the impact of the changes you make to your image. Just like you can change ordinary filters to determine what gets through them, so you can adjust a layer mask to control what changes. If that sounds confusing, don’t worry, and I will walk you through the basics of layer masks now.

How Layer Masks Work

To understand layer masks, it is best to start with the simplest form. A mask that does nothing – that is, it lets absolutely everything through from the layer you are working on, to the layer underneath – it is represented by solid white. This is referred to as a “reveal all” layer mask in Photoshop. When you look at your layers palette with a white/reveal-all layer mask, it will look like this:


When your mask is all white, any change you make on that layer, will apply to the underlying image. How do you create an all white image layer mask? Very often – as in the case of adjustment layers – one will automatically be created for you. Or, to add one yourself, just go to Layer > Layer Mask > Reveal All. You can also click on this button at the bottom of the layers palette to create one on the layer you have selected


An all-white layer mask is actually pretty useless. The utility of the layer mask comes when we start masking (hiding) things off. Before we get into that, however, let’s talk about how to create an all-black layer mask. As you might expect, a black layer mask works the opposite way as a white one, and lets absolutely nothing through to the layer underneath. You can make all the changes you want to this layer, and it will have no impact on your underlying image. Here is how it will look when you create one:


To create an all-black layer mask, just go to Layer > Layer Mask > Hide All or press ALT while clicking on the same button used in the graphic above to make a white layer mask. Now that you know what layer masks are, and the basics, we can get into the real fun of them, which is where you have blacks, whites, and even tones of gray in the same mask.


Layer masks allow you to apply changes to some parts of the image, but not others. Just remember that wherever your layer mask is white, it will let the changes you made to the layer through, so that they apply to your image below. Wherever your layer mask is black, it will not let the changes through, so they will not apply to the image. Before we get into how to do that, let’s talk about when you might want apply changes to only part of your image.

Let’s take this picture of an old barn. I’m choosing this image because it will be simple to adjust using masks, as it only involves two main areas. As you can see, the sky is too bright, while the barn and foreground are too dark. In doing this for yourself for the first time, use a simple picture like this to get started.


As you probably know, you do not want to edit these two areas in the same way, so a global adjustment to the whole image won’t help. You can, however, use masks so that edits only apply to the areas you want. For example you might darken the sky like this:


Here I masked off the barn and foreground so that the darkening only applies to the sky. I used a quick Curves Adjustment layer to darken the image. As you can see, the mask of the sky is white (so the changes affect the image in that area), while the mask of the barn and foreground is black (so the changes do not affect that part of the image).

Now let’s do the opposite to brighten up the barn and the foreground. Once again, I’ll use a layer mask so that my changes only affect the barn and the foreground, so that it looks like this:


This is the same move I made above, but in reverse. I created another Curves adjustment layer to brighten up the image. Now the layer mask is white over the barn and foreground, which means the brightening effect shows through in those areas. The layer mask is black over the sky though, so the brightening effect does not impact the sky (which is already bright enough).

But how do you do go about creating these layers and masks? Let’s find out now.

Creating a Layer Mask with Defined Edges

There are different ways to mask off portions of your images. Sometimes you will want to create a mask with a hard or definite edge, while other times you will want to gently blend in the effect to a portion of your image. In this article I will cover how to create a mask on an image with a hard edge (I will get into blending in changes in a later article). The photo of the decaying barn used above will work just fine for this, so let’s stick with that photo as our example.

Step 1: Make Your Selection

To darken the sky in the image, the first thing you need to do is select the sky. To do so, click on the Quick Selection tool from your tools panel. Then click anywhere in the sky, and while holding the mouse button down, move around where you want to select pixels for your selection. Photoshop will automatically detect edges. To make the Quick Selection tool larger or smaller, use the square bracket ( [ and ] ) keys. If you end up selecting pixels you don’t want for your selection (and you inevitably will), press the ALT key (Option on a Mac) while clicking and it will remove them.


Photoshop is famous for providing several different ways of accomplishing the same thing. Making selections with hard edges is just such a case. You don’t have to use the Quick Selection tool. You can also use the Magic Wand tool, which will select similarly-toned pixels. Or you could use the Pen tool, or the Magnetic Lasso tool to draw the edges yourself. I could actually see a good case here for the Color Range command (Select > Color Range), which selects pixels of similar colors. Any one of those tools could work. While I want to point that out, I don’t want to get bogged down covering each of them. For now, just know that while I typically use the Quick Selection tool and did so here, there are other tools you can use to make the selection.

Step 2: Refine Your Selection

Once you make your selection, you can refine it a bit if you wish. Just bring up the Refine Edge dialog box and make adjustments there.


If you do not like the selection, you can always clean it up a bit later. Once you have made the adjustments, you can use the Brush tool to add or subtract parts of the image from the mask (more about that in a minute).

Step 3: Apply the Effect

Now that your selection is created and refined, you are ready to put it into action. What we want to do is darken the sky. There are different ways to go about doing that, but what I’m going to use is a Curves adjustment layer. You don’t have to use this tool though, this same process will work when you create any sort of adjustment layer. If you are more comfortable using Levels or Brightness/Contrast, for example, use those.

In any case, all you will do now (with your selection still active) is click to create the Curves adjustment layer (or whatever type of adjustment layer you are comfortable with) and voila, the layer is created with a mask that has hidden the pixels you don’t want to change. It will look something like this:


If you use a Curves adjustment layer like I did, you just pull the line down to darken the picture. Pull it down to the left of the main cluster of pixels so that the curve is steepened through that main cluster. Of course, you may be using Levels or some other darkening tool, so just use those in whatever way you are comfortable.

Step 4: Repeat for Other Areas

In our example, we have now darkened the sky, but there are other problems with the picture. In particular, the barn and foreground are still too dark. How do we go about changing that? Pretty much the same way we did for the sky.

Start by making the selection. You can do it the same way as you did for the sky if you want. Just grab the Quick Selection tool and click around in the dark areas to create the selection. In this case, you can also just create a selection that is the opposite of the selection we previously created. That is, you previously made a selection of the sky and left everything else alone. Now you want to make a selection of everything else and leave the sky alone. To do that, you can just call up your old selection (Select > Reselect) and then tell Photoshop to reverse it (Select > Inverse). You now have a selection of everything but the sky, which is what you want.

From there, just create a Curves adjustment layer (or whatever tool you prefer to use) and apply the effect. Once you brighten the foreground, here is how it looks:


Step 5: Cleaning up Your Masks

You may find, when you are done, that there are parts of the image that don’t look quite right. Perhaps there are pixels included in one of your masks that you didn’t want, or conversely you missed pixels that should have been in the image. You can clean up the mask after the fact. I find that the easiest way is to use the Brush tool.


Select the Brush tool on the tools panel. Once you do so, pay attention to the foreground color, that which the brush will use. If you set the brush to white, it will add to a selection (show the layer through the mask). If you set the brush to black, it will remove pixels from the selection (hide the layer with the mask). Some keyboard shortcuts to keep in mind are B to bring up the Brush tool in the first place, then D to make sure the colors are set to the default (black and white), and finally X to switch between black and white.


The Brush tool is great because you can set the hardness of the edge. Start by keeping it at its softest setting, and just changing the size of the Brush by using the bracket keys [ and ]. Use it to touch up the selection (mask) where needed (make sure you are painting on the mask NOT on the actual layer). Another tip is to press ALT (option on a Mac) while clicking on the mask in your layers palatte, which will cause the screen to display the mask only. That way you can see exactly where your mask is being applied. Press ALT again while clicking on the mask to go back to normal view.

Moving on From Here

This exercise will get you started using layer masks to make adjustments to portions of your pictures. Once you have done this a few times and start to master it, there are a lot of other additional techniques you can add to further enhance your photos. For example, while this article showed you how to use masks where you have defined edges, you can gradually blend in effects using masks as well. Further, while in this article we only affected brightness, you can use layer masks to affect color, brightness, and contrast to a great degree.

Of course, masks are not just for adjustment layers either. You can make changes on layers and control where and to what extent, the change gets applied. For example, you might sharpen or blur a layer, and then use a mask to apply that effect to only a portion of the picture. It also works well by making changes with a plug-in to a duplicate layer, then creating a mask to control the application of that plug-in’s changes.

When you use layer masks, you are well on your way to unleashing the full power of Photoshop. Get started with the techniques in this article, then you can add on other aspects from there.

Read more from our Post Production category

Jim Hamel shows aspiring photographers simple, practical steps for improving their photos. Check out his free photography guides and photography tutorials at Outdoor Photo Academy. The free tips, explanations, and video tutorials he provides are sure to take your photography to the next level. In addition, check out his brand new Lightroom Course where Digital Photography School readers can use the Promo Code "DPS25" to get 25% off!

  • Teresa Venchus Greene

    This is a great detailed article! Thank you! I will definitely try this out. After applying the masks, how do you go about saving the image? Do you just save as a jpeg? Does the process of layers affect the size of the image?

  • Thanks and good question! Save it as a PSD or a TIFF file. That way the layers will be preserved. If and when you save as a JPEG it will eliminate your layers. Of course, if you are ultimately going to post to the web or something like that, you will have to end up making a JPEG, so you may end up saving it twice.

  • Teresa Venchus Greene

    Thank you!

  • Carlotta Grenier

    terrific article, the best and easiest ever, thank you

  • Hi there – great article. I find sometimes that even though i have a selection and then try ad an adjustment – the new adjustment layer does not adjust the layer below but the entire layer. Its like the selection becomes disjointed? It works sometimes and not other times? Attached is a screen shot – hopefully it will make sense. In screen shot aiming to only adjust the visible parts of layer. HELP

  • Hi there – great article. I find sometimes that even though i have a selection and then try ad an adjustment – the new adjustment layer does not adjust the layer below but the entire layer. Its like the selection becomes disjointed? It works sometimes and not other times? Attached is a screen shot – hopefully it will make sense. In screen shot aiming to only adjust the visible parts of layer. HELP

  • Walter Pinkus

    As the article described, the mask on a layer controls where the layer’s action expresses itself. If the mask is all-white, the action affects the entire image. Your “Curves 2” and “Hue/Saturation 1” layers have the same mask, so affect the same small area. Your “Brightness/Contrast 1” layer has a different mask, so affects different areas than the layers below. Your “Hue/Saturation 2” layer has an all-white mask, so affects the entire image. If you want it to affect the same area as your “Brightness/Contrast 1” layer, give it the same mask.

  • Hi Walter – that is exactly my question – HOW? I want a layer mask to only affect the same area as Brightness/Contrast layer, but it creates a whole new White layer. Hope that makes sense? Sometimes it works and other times not why?

  • Well I’m pretty familiar with layer masks but one thing you mentioned briefly was Select/Color Range which I really hadn’t used with an adjustment layer before. I experimented with it on blown out skies with lots of leaves and branches in trees where you have 100 or more little blown out spots. Using Adjustment layer/photo filter, I was able to save many images with blown out skies in those very tricky spots! So even though I didn’t think I’d get much out of this tutorial, I got way more than I bargained for. Great job!!! Example of before and after below

  • walwit

    Great! Thank you Jim, I followed your post step by step and enjoyed learning/remembering how to do this.

  • Glad you liked it. Thanks!

  • Thanks for chiming in Walter. Good stuff.

    HM, if you have a selection made when you create the layer, it should automatically apply the layer mask. Do you have a selection made when you are creating the layers?

    If Photoshop creates an all-white layer mask, all is not lost. Select your brush tool (press b), set the colors to default (press d), and then toggle the brush to black (press x). Now paint with the brush on the layer mask to eliminate all the places you don’t want the effect to be applied.

    Does that help?

  • Excellent. Glad you enjoyed it. Thanks!

  • Yes, I can see where you brought the sky back. Looks good. That color range tool can be a life saver on occasion. Glad that little aside was useful!

  • Walter Pinkus

    I agree with Jim, before starting the new adjustment layer, while still on the Brightness/Contrast 1 layer, do Select | Load Selection, click OK, then do Layer | New Adjustment Layer | Hue/Saturation… and the new layer will open with the selection from the previous layer that you have as marching ants.
    Where you’re at now, with the Hue/Saturation 2 that has the all-white mask, on that layer do Layer | Layer Mask | Delete. Then, with the Brightness/Contrast 1 layer active do Select | Load Selection, click OK. Then make Hue/Saturation 2 active, do Layer | Layer Mask | Reveal Selection. Note that, if you desire, you can load the desired selection first, then go to the target layer, delete the undesired mask, then do the new mask, and not have to go jumping back and forth between layers.

  • Thanks Walter – i realise that sometimes i dont have a selection hence the white layer – will save selection just in case to avoid reselecting area.

  • Thanks Jim – it may be that i lose my selection and hence it creates a pure white mask – will pay more attention and let you know how i get on – thanks again.

  • Cecily Bailey

    I have received 120,000 dollars last year working online and I am a full time student. I am connected with an entity that I heard about and I have received such great cash…qr It is really user friendly and I am just so happy that I found out about it.

    To Know More Click Here

  • Naseer Expert

    This is excellent advice.We are new online bidding service where investors can login and bid on Foreclosure Real Estate Properties in Arizona going to auction every day.

  • sathish
  • Darryl Lora

    Wow Jim, thanks so much for the best article (IMHO) that DPS has ever (in the 3 or 4 years I have been on DPS) had about masking! I wasn’t going to read your article (yeah, read it all a million times before) but I am sooo glad I did! NEVER before have I seen the great tip (Alt + click) to bring up a white mask!! The 2nd great tip is again using the Alt button to show where your mask is being applied. Thanks to Windows ‘snipping tool’ I have those 2 tips on my desktop. I will certainly be looking forward to more of your very clear, easy to follow tutorials.
    I do apologize if somebody else has mentioned those 2 tips in tutorials, and I just haven’t seen them. Thanks also for doing it in PS – I know most of the stuff is interchangeable, but most tutorials seem to be geared for Lightroom.

  • Thanks Darryl! Glad you liked it. I generally try to have a few practical little nuggets in these articles. Appreciate the kind words.

Join Our Email Newsletter

Thanks for subscribing!

DPS offers a free weekly newsletter with: 
1. new photography tutorials and tips
2. latest photography assignments
3. photo competitions and prizes

Enter your email below to subscribe.
Get DAILY free tips, news and reviews via our RSS feed