Photoshop Layers tutorial

Photoshop Layers Tutorial - Introducing Layers

Learn Photoshop with Photoshop Basics Tutorials at Photoshop Essentials.com!

Written By Steve Patterson

Now that we've seen how limited we'd be in our work without layers, let's create the same "work of art" we designed in the previous section, this time using layers.

First, let's once again open up a new document inside Photoshop. Go up to the File Menu at the top of the screen and select "New" from the list of options. As before, choose 640x480 from the Preset document sizes if it's not selected already, and make sure "White" is selected for "Background Contents", which will give us a new document sized to 640 pixels wide by 480 pixels high, filled with a background of white.

Here's what the New Document dialog box should look like:

Photoshop's New Document dialog box

And here's our new blank document:

The newly created blank Photoshop document

The Layers Palette

Before we go any further, since we're going to be using layers this time, we need to take a look at Photoshop's "Command Central" for layers, the Layers Palette:

Photoshop's Layers Palette

The Layers Palette is where we do pretty much everything we want to do with layers. We use it to create new layers, delete existing layers, move layers above and below each other, turn the visibility of layers on and off, create masks for layers to reveal only certain parts of a layer, add special effects to layers.... the list goes on and on, and it's all done from within the Layers Palette. We'll take a more detailed look at the Layers Palette in the another section, but there's a few things we need to look at here first.

First, notice the section that's highlighted in blue and says "Background" in italics. This is a layer! In fact, not only is it a layer, it's a special type of layer called the Background Layer. Again, we'll take a closer look at why the Background Layer is so special in another section, but every time you create a new document inside Photoshop, the document is created with exactly one layer, which Photoshop names "Background" by default (there is one exception to this, and that's if you create a new document with "Transparent" set as the Background Contents, which you'll probably never do unless you're creating web graphics, so we'll ignore this one exception). The white background you see in your document window is this Background layer. Now, when we tried creating our artwork in the previous section without using layers, what we ended up doing was creating our two shapes (the red one and the green one) on this same Background layer, and that's why they were essentially "stuck" to it, along with being stuck to each other as well. This time, we're going to do things the right way. We're going to put everything on its own separate layer and see what sort of a difference it makes.

We're going to create a new selection and fill it with a color just as we did in the previous section, but this time we want to avoid having it stuck to the white background, so the first thing we need is a new layer above the Background layer on which we can create our shape (our filled selection). To create a new layer, all we need to do is click on the "New Layer" icon at the bottom of the Layers Palette. See that row of icons along the bottom of the Layers Palette? See the one on the far right that looks like a trash can? That's not the one we want, but the one directly to the left of it that looks like a square page with the bottom left corner folded in is the New Layer icon. That's the one we want:

The Create New Layer icon at the bottom of the Layers Palette

Go ahead and click on it with your mouse and you'll see a new layer appear above the Background layer, which Photoshop will name "Layer 1":

A new layer above the Background layer is created after clicking the New Layer icon

Notice a difference between the Background layer and "Layer 1"? For starters, "Background" is written using italicized letters, but "Layer 1" isn't. That's because, as mentioned a moment ago, the Background layer is a special type of layer in Photoshop with its own set of rules, so Photoshop uses italicized letters to indicate that it's special. "Layer 1", on the other hand, isn't special at all. It's a normal, every day layer, so the name is written using normal, every day lettering.

That's an important difference, but an even more important difference is that if you look at the large rectangular area to the left of the words "Background" and "Layer 1", you'll notice that the Background rectangle is filled with white while the Layer 1 rectangle is filled with a checkerboard pattern. The rectangular area to the left of the layer name is a thumbnail-sized preview of what's currently on the layer (the contents of the layer). The checkerboard pattern you see with Layer 1 is what Photoshop uses to indicate transparency, while the white-filled area with the Background layer is indicating that the Background layer is filled with white (which is why our document is filled with white). Since the preview area of Layer 1 is filled with the checkerboard pattern, Photoshop is telling us that this layer is completely transparent. There's nothing on it at all, which is why it doesn't look like it's even there in our document window.

We're going to change that by adding our first shape to this layer. The last time we did this, we dragged out a selection using the Rectangular Marquee Tool and filled it with red, so to make sure that the only thing we're doing differently this time is using layers, let's drag out a similar selection and fill it with red.

Before we go any further though, let's rename that "Layer 1" to something more descriptive, which by the way is an excellent habit to get into that will save you a lot of time with your work in the future, so it's best that we get into it right from the start. To rename a layer, all you need to do is double-click on the name of the layer, which will highlight the name as shown below:

Renaming a layer in Photoshop

Now you can just type in a new name. Let's call this layer "red shape", since we're going to be placing our red shape on it, so go ahead and type "red shape" and then press Enter (Win) or Return (Mac). Your layers palette should now look like this:

The Layers Palette with the newly renamed layer

Now that we've renamed our layer, we need our selection. Select the Rectangular Marquee Tool from the Tools palette as before:

The Rectangular Marquee Tool in the Tools palette

You can also quickly select the Rectangular Marquee Tool by pressing the letter M (for "Marquee") on the keyboard.

Next, make sure that the "red shape" layer is selected. You can tell that a layer is selected because it's highlighted. The red shape layer should be selected and highlighted, but if it isn't, simply click on it in the Layers Palette to select it. Now, click anywhere inside your document and drag out a selection as we did previously. Continue holding the mouse button down to drag out the selection, and release the mouse button when you're happy with it. As mentioned before, you can constrain the selection to a perfect square by holding down the Shift key as you drag. Another tip, and this one is really useful, is that if you want to move your selection around on the screen while you're dragging it out, hold down the Space Bar on your keyboard as you drag. You can combine the Shift key and the Space Bar while dragging out your selection to both constrain it to a perfect square and move it around the screen at the same time.

When you're happy with your selection, we need to fill it with red, which means we need to select red as our foreground color. Click the Foreground Color selection square near the bottom of the Tools palette:

The Foreground Color selection square in the Tools palette

As mentioned previously, Photoshop sets the foreground color to black and the background color to white by default, which is why they're shown as black and white in the screenshot above. Your foreground and background colors may be different if you've changed them already while working. If you want to reset the colors to black and white, simply press the letter D on the keyboard. You can swap the foreground and background colors by pressing the letter X on the keyboard, and pressing X again will swap the colors again.

Go ahead and click on the Foreground Color selection square, which brings up the Color Picker dialog box:

The Color Picker dialog box

Again, the Color Picker dialog box gives us several ways to select a color, but to avoid getting into a discussion over color theory and making things more confusing than they need to be here, we're going to ignore all of those letters and value boxes on the right side of the dialog box and focus only on the "visual way" of selecting color using the long narrow colored bar (the hue selector) and the larger square area to the left of it (the saturation and brightness selector), as shown below:

The Hue and Saturation/Brightness Selectors in the Color Picker dialog box

We want a red color, so if red is not already showing in the large Saturation and Brightness square selection area on the right, move your mouse inside the long narrow Hue Selector bar on the right and click on a red area, which will turn the Saturation and Brightness selection area red as in the screenshot above. Then, pick a fully saturated version of red by moving your mouse into the Saturation and Brightness selection area and clicking in the top right corner, which will give us a "pure" red color without any amount of white or black mixed in with it. There's no particular reason why we're using red, or even pure red, for this example. It's just a nice bright color. Once you have red selected as the color, click OK.

Now we want to fill out selection with this red color. Previously, we went up to the Edit Menu at the top of the screen to select "Fill" from the list of options under the Edit Menu. Let's speed things up a little bit by using a keyboard shortcut this time. Hold down the Shift key and press F5 on the keyboard. This will bring up the Fill dialog box and save us from having to select it from the Edit Menu:

The Fill dialog box

As we did before when we tried this without layers, make sure "Foreground Color" is selected for "Contents". If it isn't, click the down-pointing arrow and choose it from the list of available choices. Ignore everything else in the dialog box and click OK. Photoshop will go ahead and fill out selection with the red we chose in the Color Picker, and your document will look something like this:

The Document Window showing the selection filled with red

Press Ctrl+D (Win) or Command+D (Mac) to deselect the selection. Now let's take a look at our Layers Palette:

The Layers Palette showing the red-filled selection on the "red shape" layer

The red-filled selection we just created is now visible in the preview area of the "red shape" layer. Notice that the rest of the preview area is still filled with the checkerboard pattern, indicating that the rest of the layer is still transparent, which is why in our document window, we can still see the white background "behind" the red shape.

Since we also had a green shape the last time we did this, let's add a green shape here as well. Once again, since we don't want the green shape and the red shape to be "stuck" to each other, we need to create a new layer on which we can place our green shape. So just as we did for the red shape, let's create a new layer by clicking on the New Layer icon at the bottom of the Layers Palette:

Click on the New Layer icon to create another new layer above the "red shape" layer

When you create a new layer, the new layer is added directly above whichever layer is currently selected in the Layers Palette. We want this new layer to appear above the "red shape" layer, so before you click the New Layer icon, make sure the "red shape" layer is selected. Then, go ahead and click the New Layer icon, which gives us our new layer as shown below:

The Layers Palette showing our second new layer above the "red shape" layer

Once again, Photoshop has gone and named our new layer "Layer 1". That seems a bit confusing, doesn't it, since it also named our first new layer "Layer 1" before we renamed it to "red shape". How can both of these new layers be "Layer 1"? The simple answer is, they're not. If we had not changed the name of our first new layer to "red shape" and had left it as "Layer 1", Photoshop would have named this second new layer "Layer 2", but since we did renamed it to something else, Photoshop started again at "Layer 1" with its default naming conventions.

None of this really matter to us anyway, since we're getting right into the habit of giving our layers more descriptive names. Go ahead and double-click on the "Layer 1" name of our second new layer and this time, name it "green shape". Your Layers Palette should look like this when you're done:

The Layers Palette showing our newly renamed "green shape" layer

Again, notice that the preview area of the "green shape" layer is filled with a checkerboard pattern, indicating that it's completely transparent and nothing is currently on the layer. Let's change that by putting our green shape on it. With the "green shape" layer selected, grab the Rectangular Marquee Tool from the Tools palette again and drag out another selection. As we did previously, make sure part of the selection overlaps the red shape to give the appearance that the green shape is sitting above the red shape. When you're happy with your selection, click on the Foreground Color selection square in the Tools palette to bring up the Color Picker dialog box. Choose a green color from the Hue Selector bar, and then a saturation and brightness level for the hue from the Saturation and Brightness selection area beside it, and click OK. Finally, hold down the Shift key and press the F5 key to bring up the Fill dialog box, and make sure that "Foreground Color" is selected for "Contents". Click OK, and Photoshop will fill the selection with green. Press Ctrl+D (Win) or Command+D (Mac) to deselect the selection, and here's what your document should roughly look like:

The document window showing our green and red-filled shapes

And here's what our Layers Palette now looks like:

The Layers Palette now showing the green shape in the preview area

As you can see, the green-filled shape is now showing in the preview area of the "green shape" layer. The exact placement of the red and green shapes in their respective preview areas will depend on where you dragged out your selections in the document window, so don't worry if your green or red shape isn't showing up exactly where mine is in their preview area (or in your document window, for that matter).

Now if you recall when we tried doing this without layers in the previous section, we decided we didn't like having the green shape showing up in front of the red shape and overlapping it. We wanted the red shape to be moved in front of the green one. Without layers, we couldn't do it. The red and green shapes were stuck together, just as they were stuck to the white background color "behind" them. This time, things are different. This time, we have everything on its own layer. This time, we can do it!

To move the red shape in front of the green shape in the document window, all we need to do is change the stacking order of the "red shape" and "green shape" layers in the Layers Palette. And to do that, all we need to do is either click on the "red shape" layer and drag it above the "green shape" layer, or click on the "green shape" layer and drag it below the "red shape" layer. It's that easy! Let's try it. Let's move the "red shape" layer up in the world by dragging it above the "green shape" layer.

The "red shape" layer doesn't even need to be selected in order to do this. Simply click on the layer in the Layers Palette and start dragging the layer up towards the "green shape" layer. You'll see that your mouse curser changes to a little "grab hand" icon indicating that you're dragging the layer, as shown below:

Dragging a layer in the Layers Palette

As you can see in the screenshot above, Photoshop gives you a dotted outline of the layer as you're dragging it. Continue dragging the layer up and over the "green shape" layer until you see a thin highlight line appear directly above the "green shape" layer, as shown below (it's a bit hard to see, but it's there):

A thin highlight line appears above the "green shape" layer indicating that the "red shape" layer will be moved above the "green shape" layer when you release the mouse

The thin highlight bar that appears directly above the "green shape" layer indicates that when you release the mouse, the "red shape" layer will be moved above the "green shape" layer in the Layers Palette. Go ahead and release the mouse once the highlight line appears, and the two layers will swap locations in the stacking order:

The green and red shape layers have swapped positions in the stacking order inside the Layers Palette

If we now take a look at our document window, we can see that the red shape is now in front of the green shape!

The document window showing the red shape now in front of the green shape

How easy was that? Without layers, we couldn't do this at all, but thanks to layers, moving the red shape in front of the green shape was incredibly easy. The other thing we tried to do before without layers was move the green shape independently of the red shape (and of the white background), which we also couldn't do. But let's try that now. First, make sure the "green shape" layer is selected (if it's not highlighted, click on it to select it). Then, go back to the Tools palette and select the Move Tool. It's the tool directly to the right of the Rectangular Marquee Tool, as shown below:

The Move Tool

You can also press the letter V on the keyboard to quickly select it.

Then, with the "green shape" layer selected, click inside the document window with the Move Tool and drag the cursor around. The green shape will move around the screen independently of the red shape and the white background. You don't even have to click directly on the green shape. You can click anywhere inside the document window and still move the green shape around because it's not the shape itself you're moving, it's the layer, and the layer takes up the entire width and height of the document window.

Try moving the red shape around next. Just click on the "red shape" layer in the Layers Palette to select it, then with the Move Tool still selected from the Tools palette, click anywhere inside the document window and drag the mouse around. The red shape will move independently of the green shape and the white background. See how easy that is? Layers give us complete freedom as we work. As long as we keep placing things on their own layers, they remain completely separate and independent of anything and everything in the document. Of course, this is only a simple introduction to what you can do with layers. To really start to understand what we can accomplish with layers, we need to look more closely at the Layers Palette.

Before we do that though, try this: Select the Background layer in the Layers Palette as shown below:

The Background layer selected in the Layers Palette

Now, with the Move Tool still selected, click anywhere inside the document window and and try dragging your mouse around to move the Background layer. It may appear at first like something is happening, but when you release the mouse button, you'll get an error message from Photoshop:

An error message informing you that the layer is locked and can't be moved

This error message is telling you that Photoshop can't do what you're asking it to do because the layer you've selected is locked. Remember earlier when I mentioned that the Background layer is special and has its own unique set of rules? This is one of them. We'll take a closer look at what makes the Background layer so special in the next section.

Want an easier way to follow along with our tutorials? Download them as printable PDFs!

Go to Next Section - 'The Background Layer'