Editing an ImageLesson 34 of 78

Contents

Editing an Image

Lesson 34 of 78. Sign in to keep your place.

Module 4 · Tone and colour

Why Clarity makes halos, and what Dehaze is estimating

9 min read

One mechanism behind four sliders

Shadows/Highlights, Clarity, Texture, Structure and Dehaze look like five separate features. Four of them are the same operation at different scales.

The operation: make a blurred copy of the image’s luminance. Compare each pixel to its blurred version. That comparison tells you whether the pixel is brighter or darker than its own surroundings: in other words, it separates local contrast from global brightness. Then adjust based on that difference.

  • Shadows/Highlights uses a large blur radius and applies a brightening or darkening that depends on the local average, so a dark pixel in a dark region gets lifted while a dark pixel next to a bright one does not.
  • Clarity uses a medium radius and increases the difference, adding contrast at the scale of features rather than edges.
  • Texture uses a small radius, so it affects fine detail (skin pores, fabric weave) without touching broader tonal shapes.
  • Unsharp masking is the same operation at a radius of one pixel or less, which is the sharpening lesson later.

Once you see it as one mechanism with a radius control, the sliders stop being mysterious and the artefacts become predictable.

The halo is the mechanism, not a bug

A halo appears wherever there is a strong edge. Consider a dark tree against a bright sky. Near that boundary, the blurred copy is a mixture of tree and sky. So a sky pixel close to the tree is compared against a local average that is darker than the sky, and the tool concludes it is a bright pixel and brightens it further. A tree pixel near the sky is compared against an average that is brighter, so it gets darkened.

The result is a bright band in the sky along the branches and a dark band inside them. That is the halo. It is a direct consequence of using a blurred neighbourhood as the reference, and every implementation has it to some degree.

The defences, in order of usefulness:

  1. Less. The single most effective control. Clarity at +15 is invisible; at +60 every edge rings.
  2. A smaller radius, where the tool exposes one. The halo shrinks with the blur.
  3. Masking. Apply local contrast through a mask that excludes the high-contrast boundaries, or apply it on a duplicate layer with a mask.
  4. Better algorithms. Edge-aware filters (bilateral, guided and local Laplacian) weight the blur so pixels across an edge contribute less. This reduces halos substantially. darktable’s local contrast module offers both a bilateral and a local Laplacian mode; the Laplacian one is noticeably cleaner on architecture.

Shadows/Highlights: the settings people never open

The default Shadows/Highlights in Photoshop is aggressive and produces the grey, flat, obviously-processed look that gives the tool its bad reputation. Click Show More Options and three controls appear that make it usable:

  • Amount: how much lifting. Start at half the default.
  • Tone (older versions: Tonal Width): how far up the tonal range the effect reaches. Narrow it so only genuine shadows are lifted and the midtones are left alone.
  • Radius: the blur size. Too small and you get halos round every small object; too large and the effect becomes a global brightness change. Somewhere around a tenth of the image’s short side is a reasonable starting point.

GIMP has Colours > Shadows-Highlights with the same three concepts. darktable’s shadows and highlights module and its newer tone equaliser both do this, and the tone equaliser is the better tool: it splits the image into tonal bands by a blurred luminance estimate and lets you lift or drop each band with a mask preview showing exactly which pixels each band contains.

Dehaze is a different animal

Dehaze is not local contrast. It is an estimate of atmospheric scattering.

The model: haze adds a veil of light proportional to distance, so distant objects are both brighter and less saturated than they should be. The algorithm estimates how much veil is present at each point (usually via the dark channel prior, the observation that in a haze-free outdoor photograph almost every small patch contains at least one very dark colour channel) and subtracts it, scaling contrast back up.

That is why Dehaze does things Clarity cannot: it restores saturation as well as contrast, and it does so more strongly in the distance than the foreground.

And why it fails where it does. Pushed hard, it produces dark, oversaturated skies with cyan blotches, because the veil estimate is wrong in regions that contain no dark pixels: a white wall, snow, fog that is the subject rather than an obstruction. Negative Dehaze adds a veil, which is a fast way to make a fake atmospheric distance layer in a composite.

GIMP has no Dehaze; darktable’s haze removal module implements the dark channel prior and is free.

Where each one belongs

  • Shadows/Highlights: early, in the raw developer, as a recovery step. It is fixing a capture problem.
  • Clarity and Texture: mid-pipeline, after tone, before colour grading, usually masked.
  • Texture, negative, is the gentlest skin smoothing available: it reduces fine detail without touching tonal shape, so it does not produce the plastic look that blur does.
  • Dehaze: early, and sparingly, and check the sky.

The honest limit

All of these are contrast redistribution. They make existing differences more visible; they do not add information. A hazy photograph dehazed hard shows you the noise and the JPEG blocks in the distance, because those were the only variations present, and you have just amplified them.

The same is true of shadow lifting: the shadow contains signal plus noise, and lifting multiplies both. If the shadow was three stops under on a high-ISO file, lifting it produces a noisy grey mess, and that is a capture limit rather than an editing one. The fix is a second exposure, a reflector, or a fill light, which is the compositing block’s exposure blending, and it is the honest answer far more often than a slider is.

Every lesson here is open. Your progress is recorded once you pass the Design, before Any Software exam.

Check your understanding

An editor raises Clarity on a photograph of bare trees against a bright sky, and a pale band appears in the sky along every branch. What is happening?

Pick the one you would defend. Your answer stays private.

Next lesson · 8 minSaturation is a slider that destroys detail quietly

Stuck on something?Ask Neema, your AI tutor

How to cite: Addaly (2026) ‘Why Clarity makes halos, and what Dehaze is estimating’, in Editing an Image. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/image-editing/shadows-highlights-and-local-contrast (Accessed: 13 October 2026).