Sub topic 1
How a blend mode combines a layer with what is beneath it
Prerequisites
This chapter assumes you can already do the following:
- Create, reorder, rename and group layers in Photoshop.
- Add a layer mask and an adjustment layer.
- Tell brightness, hue and saturation apart. For example, you know that lowering saturation leaves brightness unchanged.
You do not need any math beyond multiplying and subtracting decimals.
What a blend mode decides
Every pixel in a Photoshop layer has to be combined with something. By default the layer simply replaces what is under it, wherever it is opaque. A blend mode changes that rule. It is a formula that takes the layer's color and the color beneath it and produces a new color.
Photoshop uses three terms for this, and the rest of the tutorial relies on them:
- The base color is the color already in the image beneath the layer. It is the combined result of every layer below, not only the layer directly underneath.
- The blend color is the color of the layer that has the blend mode applied.
- The result color is what you see on screen after the mode has combined the two.
The blend mode menu is in the top-left corner of the Layers panel. It is set to Normal by default. The same menu appears in the toolbar when a brush, gradient or Paint Bucket tool is active, and in dialogs such as Fill and Stroke. In those places the "blend color" is the paint being applied, and the "base color" is the pixels on the active layer.
The base is the whole stack below
A common mistake is to think a layer blends with the single layer beneath it. It does not. Photoshop first composites everything below the layer, using each lower layer's own mode and opacity. The result is the base color for your layer.
This has a practical effect. If you move a Multiply layer up or down the stack, its result can change, because the base changes. Moving it above an adjustment layer means the adjustment is included in the base. Moving it below means the adjustment is applied afterward to the already-blended result.
There is one exception, which gets its own chapter. A layer group set to anything other than Pass Through is composited on its own first. Layers inside that group then blend only with other layers in the group, and the finished group is blended with the stack below as a single unit.
Blend happens per channel
In an RGB document, Photoshop applies the formula to the red, green and blue channels separately. Each channel value is a number from 0 to 255 in an 8-bit file. The tutorial's math uses 0 to 1 instead, where 0 is black and 1 is full brightness. The conversion is a division by 255.
Take a base pixel of (0.8, 0.5, 0.2) and a blend pixel of (0.5, 0.5, 0.5). The formula runs three times, once for each channel. For Multiply, the red result is 0.8 × 0.5, the green result is 0.5 × 0.5, and the blue result is 0.2 × 0.5.
Per-channel math explains why most modes can change hue as well as brightness. If the channels of the blend color are not equal, each channel is pushed by a different amount. The Component modes work differently. They convert to hue, saturation and luminosity first. They are covered in their own chapter.
A runnable model
This code applies one formula to one pixel. It also includes the opacity step described in the next section.
def normal(base, blend):
return blend
def multiply(base, blend):
return base * blend
def screen(base, blend):
return 1 - (1 - base) * (1 - blend)
def apply_mode(mode, base, blend, opacity=1.0):
"""Return one channel's result. Values run from 0.0 to 1.0."""
blended = mode(base, blend)
return base + (blended - base) * opacity
def apply_pixel(mode, base_rgb, blend_rgb, opacity=1.0):
return tuple(
round(apply_mode(mode, b, l, opacity), 3)
for b, l in zip(base_rgb, blend_rgb)
)
base = (0.8, 0.5, 0.2)
blend = (0.5, 0.5, 0.5)
print(apply_pixel(normal, base, blend)) # (0.5, 0.5, 0.5)
print(apply_pixel(multiply, base, blend)) # (0.4, 0.25, 0.1)
print(apply_pixel(screen, base, blend)) # (0.9, 0.75, 0.6)
print(apply_pixel(multiply, base, blend, 0.5)) # (0.6, 0.375, 0.15)Read the output line by line. Normal returns the blend color and ignores the base. Multiply gives a darker pixel in every channel. Screen gives a lighter pixel in every channel. The last line shows Multiply at 50% opacity, which lands halfway between the base and the full Multiply result.
Opacity scales the effect
Opacity does not change what the formula does. It controls how much of the formula's output reaches the result. At 100%, the result equals the blended value. At 0%, the result equals the base. In between, Photoshop interpolates, which is the base + (blended - base) * opacity line in the code above.
That is why lowering opacity on a blend layer usually makes the effect gentler without changing its character. A Multiply layer at 40% still only darkens, just less. The next chapter separates Opacity from Fill, which treat layer styles differently.
The six groups in the menu
Photoshop's menu is divided by thin lines into groups. Modes in the same group behave in a related way, so learning the groups is faster than memorizing 27 names. The full details come in later chapters. This table is the map.
| Group | Modes | What the group does to the base |
|---|---|---|
| Normal | Normal, Dissolve | Replaces the base, or replaces it in a random scatter of pixels |
| Darken | Darken, Multiply, Color Burn, Linear Burn, Darker Color | Makes the result the same or darker than the base |
| Lighten | Lighten, Screen, Color Dodge, Linear Dodge (Add), Lighter Color | Makes the result the same or lighter than the base |
| Contrast | Overlay, Soft Light, Hard Light, Vivid Light, Linear Light, Pin Light, Hard Mix | Darkens some tones and lightens others, which raises contrast |
| Inversion (comparative) | Difference, Exclusion, Subtract, Divide | Compares the two colors and shows how they differ |
| Component | Hue, Saturation, Color, Luminosity | Takes one or two of hue, saturation and luminosity from the blend and the rest from the base |
Pass Through appears only for layer groups and is not part of these six. Some tutorials list the Darken and Lighten groups' last item (Darker Color and Lighter Color) as odd members, because they compare whole pixels instead of working channel by channel.
Predicting a result before you try it
You can often guess the outcome from the group alone, which saves trial and error. Ask two questions.
- Which direction does the group push? A Darken-group layer cannot make any pixel brighter than the base. A Lighten-group layer cannot make any pixel darker. If you apply Multiply and the image looks brighter, something else is going on, such as another layer above it.
- Which blend tones matter? In Multiply, white in the blend layer changes nothing and black gives black. In Screen, the reverse is true. Tones that change nothing are called neutral colors. They are the basis for non-destructive dodge and burn, and a later chapter covers them for every mode.
A quick check is to fill a new layer with 50% gray and cycle through modes with the keyboard. With the Move tool active, Shift + Plus and Shift + Minus step through the menu. Watch which modes make the image change and which leave it alone. That experiment shows the neutral color of each mode on your own image.
Edge cases
- Transparent pixels. A fully transparent pixel in the blend layer has no effect, in any mode. Only pixels with some opacity take part in the blend.
- The Background layer. A layer set to Background cannot take a blend mode, because nothing lies beneath it. Convert it to a normal layer first, or add a layer above it.
- A lone layer. If a layer is at the bottom of the stack over transparency, the base is transparent and the layer looks like Normal. Its mode appears to do nothing until something lies beneath it.
- Adjustment layers. They have a blend mode menu too. Here the "blend color" is the adjustment's output, and the base is everything below. This is why a Curves layer set to Luminosity changes brightness without shifting color.
- Gamma. By default Photoshop blends the gamma-encoded values you see in the document, not linear light. Because of this, Screen and Multiply look slightly different from the physical behavior of light. The setting Blend RGB Colors Using Gamma, in Color Settings under More Options, changes this. Leave it at its default unless you have a specific compositing reason, because changing it alters how every existing blend looks.
- Bit depth. Formulas run the same way in 8, 16 and 32 bits per channel. In 8-bit files, stacking many blend layers can produce banding, because each step rounds to whole numbers. Working in 16-bit reduces this.
Check your understanding
Exercise
A pixel in the base has the value 0.6 in the red channel. A Multiply layer has 0.5 in the red channel, and its opacity is 50%. What red value does the result have, and why is it not 0.3?
Show answer
Multiply gives 0.6 × 0.5 = 0.3 as the blended value. At 50% opacity, the result is halfway between the base and the blended value: 0.6 + (0.3 − 0.6) × 0.5 = 0.45. The value 0.3 would appear only at 100% opacity.
Exercise
You place a Screen layer over a photo, and part of the image looks darker than before. Name two causes that do not involve the Screen formula itself.
Show answer
Possible causes include another layer above the Screen layer that darkens the image, a layer mask or Blend If setting on a different layer, or a layer group above it that is not set to Pass Through. A Screen layer alone cannot darken a pixel, so the darkening must come from elsewhere in the stack.