Download Source Files
In the following tutorial, you’ll learn how to create a lock icon with some effects, opacity masks, gradients, and simple shapes in Illustrator. Many of these techniques can be applied easily to other icon designs.
Final Image
Below is the final vector image we’ll be making in this tutorial. For further research in lock icon designs, check out PSDTUTS’s Create a Shiny Lock Icon Design, as there are many ways to create this kind of design.
Step 1
Create a new documents 8.5 inches wide by 11 inches tall. Then use the Rectangle Tool (M) to create a rectangle 3.5 inches wide by 2.75 inches tall.
Step 2
With the Rectangle still selected, go to Filter > Stylize > Round Corners to bring up the Round Corners dialog. Change the Radius to .375 inches.
Step 3
Create a Liner Gradient in the Gradient Panel. Next, add three more swatches on the Gradient by clicking below the Gradient Slider. Now you should have five swatches, including the original two swatches.
Change the color of the far left swatch to a light gold color (I used these CMYK values: C=0 M=6 Y=28 K=0). Change the second swatch from the left to a darker gold color (C=8 M=12 Y=27 K=0). Change the third swatch from the left an even darker gold color (C=18 M=27 Y=55 K=0). Change the fourth swatch to the darkest gold (C=25 M=35 Y=63 K=0). Finally, change the last swatch to match your first light gold color.
Step 4
Create a rectangle that is .25 inches wide by 2.75 inches tall. Then fill it with a 40% black. With the new rectangle selected, go to Effect > Sketch > Graphic Pen, to open up the Graphic Pen Dialog. Change the Stroke Length to 15, the Light/Dark Balance to 10, and the Stroke Direction to Horizontal.
Step 5
Expand the graphic pen effect by going to Object > Expand. Once the shape is expanded, go to Object > Live Trace > Tracing Options, to bring up the Live Trace dialog. All the default Adjustments settings in the right of the dialog stay the same.
In the Trace Setting side of the dialog, change the Path Fitting to 1 px, the Minimum Area to 1 px, the Corner angle to 1 px, check the Ignore White checkbox, and then press the Trace button. Next, go to Object > Live Trace > Expand.
Step 6
After you have expanded the Graphic Pen Effect, change the dimensions of texture to 3.5 inches wide and keep the height the same size. Copy (Command + C) the original rectangle gradient and Paste it in Front (Command + F). Select the newly copied gradient shape and the texture. Then press the Intersect Shape Areas button from the Pathfinder Panel.
Step 7
With the texture selected, grab the Eyedropper Tool (I). Then click on your first gradient to load the gradient attributes. Add another swatch to the texture gradient in between the first two swatches. Your texture gradient should have 6 swatches now.
Change the first two swatches to you first light gold color (C=0 M=6 Y=28 K=0). Change the third swatch to a darker gold (C=8 M=12 Y=27 K=0). Change the third and fourth swatch to your darkest gold color (C=25 M=35 Y=63 K=0). Finally, change the last swatch to your original third swatch color (C=8 M=12 Y=27 K=0).
Step 8
With the Ellipse Tool (L), draw an ellipse 4.5 inches wide by one inch tall. Place the ellipse over the lock body so the center of the ellipse is slightly higher than the top of the lock body.
Select the lock body and ellipse and align them by pressing the Horizontal Align Center Button. Next Copy (Command + C) the original lock shape (not the texture) and Paste in Front (Command + P). With the copied shape and the ellipse selected, Intersect the shapes in the Pathfinder Panel.
Step 9
With the new shape selected, create a Linear Gradient from the Gradient Panel. Change the first swatch to one of your lighter gold colors (C=8 M=12 Y=27 K=0). Then change the second swatch to your dark gold color (C=25 M=35 Y=63 K=0). With the Gradient Tool (G), adjust the gradient by clicking at the top of the shape and drag to the bottom of the shape.
Step 10
Next comes the top of the lock icon. Start by drawing a 2 inch by two inch ellipse with the Ellipse Tool (L). Also, draw a 2 inch by 1 inch rectangle with the Rectangle Tool (M). Select both shapes, Horizontally Align them and Vertically Align the Bottom. Next, press the Add To Shape Area button in the Pathfinder Panel and Expand.
Step 11
With the Direct Selection Tool, select the bottom line of the shape and delete it. Next, change the Stroke Weight to 26 pt and Expand the Appearance.
Step 12
With the top lock shape selected create a Linear Gradient. Then change the first swatch to a 22% black and the second swatch a 72% black. With the Gradient Tool (G), adjust the gradient by clicking from the top of the shape and drag to the bottom.
Step 13
With the shape still selected, go to Object > Path > Offset Path to bring up the Offset dialog. Change to Offset to -.075 in and press OK. Select the new offset path and create a Linear Gradient. Fill the first swatch with white and the second swatch with a 50% black. Adjust the gradient with the Gradient Tool (G), as in the previous step.
Step 14
With the newest offset still selected, create a second offset the same as before, giving you three total shapes. The inside shape should still be a gradient, but you are going to add two swatches to the Gradient Slider. Change the first swatch to 60% black, the second to 30% black, the third to 20% black, and the fourth to an 85% black. Also, adjust the gradient as in the previous steps.
Step 15
Select the two inner offsets and stretch them down slightly. This helps the highlight not look so perfect.
Step 16
Select all three objects of the lock top. Then send them behind the lock body.
Step 17
Draw an ellipse that is 4.5 inches by 4.5 inches. Then create a Radial Gradient in the Gradient Panel. Make the first swatch (inner radial swatch) a 65% black and the last swatch (outside radial swatch) a white color. Next, scale the ellipse down to .5 inches tall, while keeping the same length. Set the shape to multiply and place it behind all the lock artwork.
Step 18
Select everything but the drop shadow. Then Copy (Command/Ctrl + C), Paste in Front (Command/Ctrl + F), and select Flip Vertical from the pop-up menu in the Transform Panel. Drag the copied artwork to the bottom of the original artwork. Then send it behind all other artwork including the drop shadow.
Step 19
Draw a rectangle that is slightly bigger than the flipped lock artwork. Create a Linear Gradient. Keep the default white and black for the swatches. Adjust the gradient so the white is at the top of the gradient and black is at the bottom.
Step 20
Select all the flipped artwork, the gradient, and select Make Opacity Mask from the pop-up menu in the Transparency Panel.
Step 21
For the background, create a rectangle to the size of your document. Fill it with a 8% black. Then send it behind all the other artwork. You can change the color of the background to any color you prefer, if you are not to excited about the grey color.
Step 22
For the typography you can choose any font, lettering, and branding. Once you’ve type in your brand, outline the type by going to Type > Create Outlines (Command + Shift+O).
Step 23
Place the lettering over the desired area of the artwork.
Step 24
Copy (Command + C) both the lock texture and outlined type. Then Paste in Front (Command + F). Select both copies and Intersect the shapes. Use the Eyedropper Tool and sample the textures gradient. Next, select the original outlined text. Then use the Eyedropper to copy the color of the lock body gradient.
Step 25
Select the original outlined text, and offset the path as before, but this time set the Offset in the Offset dialog to .075 inches. Create a Linear Gradient with the first swatch being your dark gold color (C=25 M=35 Y=63 K=0) and your second swatch an even darker gold color (C=33 M=47 Y=85 K=25). Adjust the gradient so the darkest color is on the top.
Step 26
Select the original text outline with the Selection Tool (V), while holding down the Alt button (to copy the object), and drag slightly down and to the right. Change the color to your darkest gold. This will give the text some depth.
Step 27
Select the text offset and Copy (Command + C) and Paste in Back (Command + B). Then change the color to you light gold color. Move it down slightly.
Final Image
All done! The final vector lock icon design is below.

cool techniques!
Rype U rocks man!
Great Tutorial Rype , this must be the next feature on my site!
now THAT’S impressive. Very cool. I thought it was raster at first.
nice one , heh..looks almost like made in Photoshop…. but scalable…
You have nice tips.
loving the outcome, nice work!
that’s a great lock
Now this is some good looking s**.
Really cool! Keep up the good work! Any tuts on 3D Revolve effect btw? [Like the cans of baked beans but revolve effect not extrude and bevel]
Excellent work, learned some tricks on the way!
good tips!
Good tutorial but i think the main lock part looks too real for the loop/handle part. The lock looks more 3d and the loop looks flat. Nice tut tho
Yum Yum. This looks fantastic!
Hmmm, and where the label “vectortuts” in reflection?
Great techniques. The brushed metal look is very good.
great tutorial – I like the end result too.
Nice job, but the reflection is missing the text.
I love it! good tutorial!
Thanks — this is great!
Fantastic tut
thanks dude, this is a really cool stuff!
greatings from Argentina
anyone else having trouble with step 20 ?
When i make the opacity mask, the whole lock just sort of fades a little. i dont get the top part fading to nothing. anyone know what i might be doing wrong. i think i have followed it precisely.
@edawg – well spotted. i missed that.
Hi, this is a very good tutorial, can i link this tutorial to my forum?. It’s a new forum, please visit and post your ideas
bye
Maus
Having serious trouble with step 6.. it wont intersect the paths.. just keeps saying “the filter produced no results”
Any ideas?
Hey Tomf, just had exactly the same problem. Bet your using CS4 as well eh?!
I just tried to do it on CS3 and it works fine, so seems to be something with the new Creative Suite.
Don’t know how to get past it on CS4 though… Can’t find anything to work.
Sorry dude!
Great tutorial man i learnt HEAPS then, thank you so much!
Nice!
Love the tutorial but had problems with Illustrator CS3 not being able to do the Intersect portion of the tutorial. Anyone have any ideas why this could be the problem?
Verry Nice….
Thank you for sharing…
very interesting tut, to intercept the paths I used clipping mask instead,
Thanks for sharing.
This tutorial doesn’t work for me. In Step 5, Object>Expand is not available. If instead I use Object>Expand Appearance, then in Step 6 the intersect operation produces no results. “Please select two overlapping paths,” it says.
This is in Illustrator CS4, on either a PC (Win 7) or a Mac OSX 10.5.8
Same Problem here.
I’m using CS 5 on Mac OSX 10.6.4
All are very nice but the steal effect was not match properly please upload correct image,..
thanks, your design steps would helps an amatur into pro, very easy to understand
Getting error message “The filter produced no results. Please select two intersecting paths” when I try to intersect the texture and the gradient.
Every time I use Adobe Illustrator I want to rip my hair out. This program is beyond frustrating and is the least user friendly design program I’ve ever come across. GIMP is the shit. It puts Illustrator to shame and makes my life easier. Your tutorial doesn’t work man. Sorry to break it to you.