Sub topic 4
Blend Modes as Simple Per-Channel Math
Prerequisites and the working model
This chapter assumes that you can work with Photoshop layers, layer masks, adjustment layers, brightness, hue, and saturation. You should also know that an RGB color has three channels: red, green, and blue.
A blend mode compares two colors:
- The base color comes from the visible layer beneath.
- The blend color comes from the layer whose mode you changed.
- The result color is the value produced by the blend mode.
Photoshop performs most blend-mode calculations separately for the red, green, and blue channels. For a simple calculation, represent each channel with a number from 0 to 1:
- 0 means black.
- 1 means white.
- 0.5 means middle gray.
The same formula runs once for each channel. A red channel can therefore change differently from a blue channel, which is why many blend modes affect color as well as brightness.
Core formulas
The most useful formulas are Multiply, Screen, and Overlay. Let B represent the base channel and S represent the blend channel.
| Mode | Formula | Typical result |
|---|---|---|
| Multiply | B × S | Darker than either input |
| Screen | 1 − (1 − B) × (1 − S) | Lighter than either input |
| Overlay | If B < 0.5, 2 × B × S; otherwise, 1 − 2 × (1 − B) × (1 − S) | Increased contrast |
Multiply is straightforward. If B is 0.5 and S is 0.5, the result is 0.25. White is neutral because B × 1 equals B. Black forces the result to black.
Screen reverses the logic by multiplying the inverted values, then inverting the result. If both inputs are 0.5, the result is 0.75. Black is neutral because Screen with black returns the base value. White produces white.
Overlay uses the base value to choose its behavior. Values below middle gray use a Multiply-like calculation. Values above middle gray use a Screen-like calculation. A 50% gray blend is neutral for Overlay because it leaves the base unchanged. Hard Light uses the same formula but swaps the roles of base and blend.
def multiply(base, blend):
return base * blend
def screen(base, blend):
return 1 - (1 - base) * (1 - blend)
def overlay(base, blend):
if base < 0.5:
return 2 * base * blend
return 1 - 2 * (1 - base) * (1 - blend)
def hard_light(base, blend):
return overlay(blend, base)
print(multiply(0.5, 0.5)) # 0.25 (darker)
print(screen(0.5, 0.5)) # 0.75 (lighter)
print(overlay(0.5, 0.5)) # 0.5 (a 50% gray blend leaves the base value unchanged)Opacity after the blend calculation
Photoshop first calculates the mode result, then mixes that result with the original base according to layer opacity. If the opacity is 40%, the displayed channel is approximately:
Result × 0.4 + Base × 0.6
This explains why reducing opacity softens a blend-mode effect without changing the mode's underlying behavior. It also explains why a mode can still shift colors at low opacity: the calculated result may differ in every channel.
The exact behavior can vary with document color settings, transparency, and whether you adjust Opacity or Fill. Treat these formulas as a working model for ordinary opaque pixels, not as a complete description of Photoshop's rendering engine.
> callout note > Calculate one channel at a time. If a result seems unexpected, inspect the red, green, and blue values separately. A mode that looks neutral in brightness can still change color when the channel values differ.
Check your prediction
Exercise
The base channel is 0.2 and the blend channel is 0.5. What are the Multiply and Screen results?
Show answer
Multiply is 0.2 × 0.5 = 0.1. Screen is 1 − (1 − 0.2) × (1 − 0.5) = 0.6.