Luminosity masks in Paint by Zaweba for tone control
Select the Lights, Darks or Midtones of a picture as soft selections that follow brightness, then mask adjustments with them in Paint by Zaweba.

Landscape photographers have long used luminosity masks to work on the bright parts of a picture without touching the dark ones, or the other way round, with no hard edges at all. The selection follows brightness itself, so it fades smoothly from fully selected in the brightest tones to not selected in the darkest. Paint by Zaweba builds these in, so there's no need for actions or extra panels.
The quick version
Select > Luminosity Masks offers ready-made selections of the Lights, Darks or Midtones of the visible picture. Each comes in levels 1 to 4. Level 1 is broad, taking in a wide sweep of tones with a gentle fall-off. The higher levels are narrower, so Lights 4 picks only the very brightest areas and Darks 4 only the deepest shadows.
Midtones is the one people overlook. It selects the middle values and leaves both ends out, which makes it a good mask for adding contrast or saturation to the main body of a picture without blowing out the sky or blocking up the shadows.
The full dialog
Luminosity Mask, the dialog version, adds a fifth strength, lets you use the active layer as the source instead of the whole visible picture, and shows a live preview. It also offers the same outputs as Focus Area: a selection, a layer mask, a new layer or a new layer with a mask.
Using the active layer as the source is useful when your document has several layers and you want the mask to follow just one of them, say the photo, rather than the photo plus a texture overlay above it.
These masks work at 8, 16 and 32 bits, so you can use them on high bit depth photos without the tones being squeezed into fewer steps.
What to do with them
The classic job is the sky. Load Lights 2 or 3, add a Curves or Levels adjustment masked by it, and pull the bright tones down a touch. Because the mask is strongest in the brightest areas and fades away from them, the sky darkens while the foreground hardly moves, and there's no halo along the horizon.
For shadows, Darks does the reverse. Lift the dark tones with Curves or Exposure through a Darks mask and detail comes back without the highlights getting greyer.
Midtones pairs well with saturation or vibrance. Colour gains life where most of the picture's information is, while the highlights stay clean.
You can also paint through a luminosity selection. With Lights selected, a soft brush in a warm colour on a new layer with a suitable blend mode puts a glow only where the light already is.
Choosing a level
Start broad and narrow down. Level 1 is forgiving and good for gentle global work. If the change spreads into tones you wanted to protect, step up a level. For pinpoint fixes, such as calming a single bright window, the highest levels target just that sliver of brightness.
Sending the result to a layer mask rather than a plain selection helps here, because the mask keeps its greys and you can fade the adjustment with its opacity afterwards. Bright areas of the mask are where your adjustment acts.
Overcooking the tones
Stacking several strong luminosity adjustments can flatten a photo. Each one compresses part of the tonal range, and together they can leave everything looking grey. Make a change, look at it, then decide whether you need the next.
Forgetting what the source is can also confuse. The menu version uses the visible picture. If you add a bright layer on top and then make a mask, the mask follows that new layer's brightness too. Use the dialog's active layer option when you want a single layer to drive it.
Finally, keep adjustments as layers. A luminosity mask on an adjustment layer can be edited, faded with opacity or deleted later. A mask applied directly to pixels can't.
Used with care, luminosity masks are one of the gentlest ways to shape light in a photo, and with them built into Paint by Zaweba they are a menu click away.