Sub topic 5
Neutral colors: what disappears in each mode
This chapter assumes you can work with layers and masks in Photoshop and that you know brightness, hue and saturation. It also assumes you have met the base, blend and result colors from earlier chapters. You will learn which color makes a layer vanish in each blend mode, why that happens, and how to use it.
What a neutral color is
A neutral color is the blend color that leaves the base color unchanged. If you fill a layer with it and set the mode, the image looks the same as before. Any pixel that differs from the neutral value changes the result. The neutral is therefore the "no effect" point, and your marks on a neutral-filled layer show up as local adjustments.
You can derive a neutral from the math. Solve result = base for the blend value. The next section does this for each group.
Neutrals by group
| Group | Modes | Neutral color | Why |
|---|---|---|---|
| Normal | Normal, Dissolve | None | The blend color replaces the base wherever the layer is opaque |
| Darken | Darken, Multiply, Color Burn, Linear Burn | White | Each mode can only darken, and white is the brightest blend value |
| Darken | Darker Color | White | It keeps the darker of two colors, and white is never darker |
| Lighten | Lighten, Screen, Color Dodge, Linear Dodge (Add) | Black | Each mode can only lighten, and black is the darkest blend value |
| Lighten | Lighter Color | Black | It keeps the lighter of two colors, and black is never lighter |
| Contrast | Overlay, Soft Light, Hard Light, Vivid Light, Linear Light, Pin Light | 50% gray | Gray is the midpoint where the mode switches from darkening to lightening |
| Contrast | Hard Mix | None | It posterizes every channel to 0 or 1, so nothing is preserved |
| Inversion | Difference, Exclusion, Subtract | Black | Subtracting or mixing in zero changes nothing |
| Inversion | Divide | White | Dividing by one changes nothing |
| Component | Hue, Saturation, Color, Luminosity | None | These swap one component of the base for the blend's component |
The pattern is simple. Modes that darken use white. Modes that lighten use black. Modes that do both use the middle gray.
Deriving the neutrals
Work in values from 0 (black) to 1 (white). Let b be the base and s the blend.
- Multiply is
b * s. Withs = 1the result isb. White is neutral. - Screen is
1 - (1 - b) * (1 - s). Withs = 0the result is1 - (1 - b), which isb. Black is neutral. - Overlay uses
2 * b * swhenb < 0.5, and1 - 2 * (1 - b) * (1 - s)otherwise. Sets = 0.5and both branches reduce tob. 50% gray is neutral. - Hard Light is Overlay with the layers swapped, so its neutral is also 50% gray. The gray belongs on the blend layer, not the base.
- Difference is
|b - s|. Withs = 0you getb. Black is neutral. - Divide is
b / s. Withs = 1you getb. White is neutral.
The next script checks these neutrals. It also covers the burn, dodge, linear, Soft Light, Exclusion and Subtract modes, using the common textbook formulas. Photoshop's internal versions differ slightly in edge cases, but the neutral values are the same.
import math
def clamp(x):
return max(0.0, min(1.0, x))
def multiply(b, s):
return b * s
def screen(b, s):
return 1 - (1 - b) * (1 - s)
def color_burn(b, s):
if b >= 1:
return 1.0
if s <= 0:
return 0.0
return clamp(1 - (1 - b) / s)
def color_dodge(b, s):
if b <= 0:
return 0.0
if s >= 1:
return 1.0
return clamp(b / (1 - s))
def linear_burn(b, s):
return clamp(b + s - 1)
def linear_dodge(b, s):
return clamp(b + s)
def overlay(b, s):
if b < 0.5:
return 2 * b * s
return 1 - 2 * (1 - b) * (1 - s)
def hard_light(b, s):
return overlay(s, b)
def soft_light(b, s):
if s <= 0.5:
return b - (1 - 2 * s) * b * (1 - b)
d = ((16 * b - 12) * b + 4) * b if b <= 0.25 else math.sqrt(b)
return b + (2 * s - 1) * (d - b)
def linear_light(b, s):
return clamp(b + 2 * s - 1)
def difference(b, s):
return abs(b - s)
def exclusion(b, s):
return b + s - 2 * b * s
def subtract(b, s):
return clamp(b - s)
def divide(b, s):
if s <= 0:
return 1.0
return clamp(b / s)
NEUTRALS = [
("multiply", multiply, 1.0),
("color_burn", color_burn, 1.0),
("linear_burn", linear_burn, 1.0),
("screen", screen, 0.0),
("color_dodge", color_dodge, 0.0),
("linear_dodge", linear_dodge, 0.0),
("overlay", overlay, 0.5),
("hard_light", hard_light, 0.5),
("soft_light", soft_light, 0.5),
("linear_light", linear_light, 0.5),
("difference", difference, 0.0),
("exclusion", exclusion, 0.0),
("subtract", subtract, 0.0),
("divide", divide, 1.0),
]
samples = [i / 20 for i in range(21)]
for name, fn, neutral in NEUTRALS:
for b in samples:
assert math.isclose(fn(b, neutral), b, abs_tol=1e-9), (name, b)
print(f"{name}: neutral {neutral} leaves every base value unchanged")
print(multiply(0.5, 0.0)) # 0.0, so black is not neutral for Multiply
print(screen(0.5, 1.0)) # 1.0, so white is not neutral for ScreenThe 8-bit caveat for 50% gray
Photoshop's "50% gray" is RGB 128, 128, 128. In 8-bit that is 128 / 255, or about 0.502, not exactly 0.5. In practice the shift is far too small to see, but it is why a gray layer in Overlay can look very slightly different from no layer. In 32-bit mode you can use exactly 0.5. Check the color picker if you suspect a faint cast.
Putting neutrals to work
Non-destructive dodge and burn
- Choose Layer > New > Layer.
- Set Mode to Overlay or Soft Light.
- Turn on the checkbox that fills with the mode's neutral color (50% gray).
- Paint with a soft white brush at low Flow to lighten, and a soft black brush to darken.
The gray stays invisible. Only your strokes change the image, and you can erase or lower opacity at any time. Soft Light is gentler. Overlay is stronger and shifts saturation more.
Texture and grain layers
Place a texture or noise layer over the image. Set it to Overlay, Soft Light or Hard Light. The midtones of the texture are close to gray, so they do nothing. Only the lighter and darker detail comes through.
If the texture has a white or black background instead, switch to Multiply (white background) or Screen (black background). Dust, scratch and light-leak overlays often use the black background with Screen.
Removing a background from a layer
If a layer was drawn on white, Multiply removes the white. If it was drawn on black, Screen removes the black. This is common for line art and for flares or smoke shot on black.
Modes without a neutral
- Normal and Dissolve: At 100% Opacity an opaque pixel replaces what is beneath it. Lower Opacity blends toward the base, but no color is ever invisible. Transparent pixels are the only way to "disappear" here.
- Hard Mix: Each channel becomes 0 or 1 depending on the sum of base and blend. Nothing is preserved at any value, so treat it as an effect, not a utility.
- Component modes: Hue, Saturation, Color and Luminosity take only one aspect from the blend layer. A layer that has the same value as the base in that aspect would be neutral, but that varies per pixel, so there is no single fill color. A mid gray in Color mode, for example, desaturates the base.
Neutrals and opacity
Lower Opacity or Fill mixes the result with the base. A neutral stays neutral at any opacity, because the result already equals the base. Opacity matters once your strokes depart from the neutral: it scales how strongly they show.
Quick checks when something looks off
- A gray Overlay layer changed the image. Check that the color is really 128, 128, 128 and that the mode is Overlay, not Normal.
- A white-background layer still shows a white box. Set the mode to Multiply, not Screen.
- A black-background layer shows a dark box. Set the mode to Screen or Linear Dodge, not Multiply.
- Soft Light gray looks flat. Switch to Overlay for stronger local contrast, or lower opacity on Overlay for more control.
Exercise
You paint dust specks in white on a black background in a separate document and drag the layer into a photo. Which mode removes the black, and what is the neutral color of that mode?
Show answer
Screen (or Linear Dodge (Add)). Their neutral color is black, so the black background has no effect and only the white specks lighten the photo.
Exercise
Using the Overlay formula, show that a blend value of 0.5 leaves a base of 0.8 unchanged.
Show answer
Because the base 0.8 is not below 0.5, use 1 - 2 (1 - 0.8) (1 - 0.5). That is 1 - 2 0.2 0.5 = 1 - 0.2 = 0.8. The result equals the base.
Exercise
A Divide layer filled with white sits above your image. What does the image look like, and what changes if you fill the layer with 50% gray instead?
Show answer
With white, the image is unchanged, because dividing by 1 returns the base. With 50% gray, each base value is divided by 0.5, which doubles it. The image becomes much brighter, and values above 0.5 clip to white.