Photoshop Tip: Locking Transparent Pixels

If you look on the Layers palette in Photoshop, near the top of the palette, you’ll see the word “Lock” followed by four symbols. From left to right, the icons are Lock Transparent Pixels, Lock Image Pixels, Lock Position and Lock All. Today’s little tip relates to the first button, Lock Transparent Pixel and how you might use it in your work.

LayersPalette

It’s very easy to change a block of color in Photoshop if it has strong, defined edges. You could use the Paint Bucket or Color Replacement tool to change the color, but if you want to change the color of an object that has faded edges or is semi-transparent you need to apply press the “Lock Transparent Pixels” button on the layers palette to do just that.

Here’s an example. Let’s say for example you have some sort of colored shaped with soft edges. Take the green heart shape below. It’s solid on the outside but the inside fades to transparent.

GreenFadedHeart

Now let’s say we wanted to change the heart from green to red using the Paint Bucket. If we click on a green section with the Paint Bucket tool with red as a foreground color, this is what we get.

RedHeart

We’ve lost the faded edge and it looks pretty rough all around.

To deal with this problem, click on the “Lock Transparent Pixels” button near the top of the layers palette in Photoshop. The important thing to remember is that this only works on layers with transparency, it has absolutely no effect if the object is part of the background layer.

LockTransparentPixels

Once the button is press, the transparent pixels are locked and we will only be able to manipulate the opaque parts of the layer. Now when we click on the green heart, the fade to white is preserved.

TransparentPixelsColourChange

This effect is useful for both web and print work.  Have you used it before?

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • Wardrop

    I’ve always just used colour overlay for this (under Blending Options), though I’m sure I’ll find uses for this transparency locking technique. Thanks.

  • andaraes

    I’ve been using the fill command [shift + F5]. As long as preserve transparency is selected, you’ll get the desired result. Interesting though, I never knew what that was for.

  • http://icoland.com/ glenngould

    It’s solid on the outside but the inside fades to white.

    It should be fades to transparent shouldn’t it? It’s obvious, but just for it might confuse some people.

  • http://icoland.com/ glenngould

    Some other tips:

    -It’s useful when you want to retouch the layer with the stamp tool, as it avoids adding new areas to the layer while cloning.
    -Notice that, blur filter and some others won’t work as you would expect, if you lock the tranparent pixels.

  • http://www.laughingliondesign.net Jennifer Farley

    Hi Glenn, thanks for the tips and I’ve changed that text too.

    Hi Wardrop, yes colour overlay is excellent too.

  • http://www.crearedesign.co.uk/ Nicola Connolly

    I haven’t used this technique before – thanks for the tip, I’m sure it’ll come in useful.

  • andy

    Wana use shortcut?

    for the same thing shown above, just Set you foreground color and press Ctrl+Alt+Backspace

    and for applying background color press
    Ctrl+Shift+Backspace…

    :)

  • http://www.laughingliondesign.net Jennifer Farley

    Excellent shortcuts Andy for filling with foreground and background colours. You still need to hit the Lock Transparent Pixels icon first though.

  • markfiend

    It’s amazing isn’t it, you can have been using Photoshop for years and there’s still new things to learn!

  • direkfilmizle

    thanks alot for information
    film izle

  • Jac

    must come in handy at some point …thanks!

  • biswa

    nice tips