Free

Free coded apps to suit all. No sign up, no email, usable offline, updates when I can, feedback welcome. Send feedback

How-to

How to select the sky in a photo

Select > Sky in Paint by Zaweba picks the blue or bright smooth area joined to the top edge and mattes the horizon, ready for a mask or a new sky.

How to select the sky in a photo

Choose Select > Sky. Paint by Zaweba looks for blue or bright, smooth areas that join the top edge of the picture, selects them and mattes the horizon so the edge isn't jagged. It is a best effort, and it can miss dark or sunset skies, but on an ordinary daytime landscape it gets most of the way in one click.

Selecting the sky is one of the most common jobs in photo editing. You might want to darken a washed out sky, warm it up, add contrast to the clouds or replace it altogether, and every one of those starts with a clean selection that stops at the trees and rooftops.

What the command looks for

The rule is simple to understand, which helps you predict when it will work. Sky is usually bright or blue, it is usually smooth compared with the land, and it usually touches the top of the frame. Areas that fit all three are taken in. A blue car at the bottom of the picture isn't joined to the top edge, so it's left alone.

That same rule explains the misses. A night sky isn't bright, a deep orange sunset isn't blue, and a sky full of busy cloud texture isn't smooth. In those cases, expect to finish the job by hand.

Step by step

Open the photo and choose Select > Sky. Look at the marching ants, then switch to a view that shows the selection more clearly. Quick Mask or the Refine Edge workspace are both good for this, because they show exactly where the edge falls.

If the selection is close, take it into Select > Refine Edge. Its brushes let you add a missed patch of cloud or remove a church spire that crept in, and its Refine Brush helps with fine tree branches against the sky. Choose a layer mask output so nothing is deleted.

Then do the job you came for. With the sky selected, add an adjustment layer from Layer > New Adjustment Layer and mask it to the selection, so only the sky changes. Curves for contrast, Hue/Saturation or a photo filter to warm it, or a gradient map for a stylised look all work this way.

When the sky is hard

For skies the command misses, other selections help. Select > Luminosity Masks gives soft selections of the Lights, Darks or Midtones, and a bright sky is often caught well by the Lights. Colour Range can pick a particular blue. Focus Area is useful when the land is sharp and the sky is soft or out of focus. You can combine these, adding one selection to another, and then refine the edge.

Trees are the usual trouble spot. Rather than chase every leaf, select generously and then paint on the mask with a soft brush at low opacity. The eye forgives small blends far more than a hard halo.

Getting a good result

Adjust gently. A sky darkened too far next to a bright foreground looks fake, especially where the two meet. Zoom in along the horizon after the change, because a light rim along hills or buildings is the most common sign of an edit. If you see one, shrink the mask a touch or paint over the rim at low opacity.

Going further

If you want a different sky altogether, Paint by Zaweba has Edit > Sky Replacement, which uses the same kind of matte and then lets you place and relight a new sky with a live preview. For most photos, though, selecting the existing sky and giving it a little more depth is all that's needed.