Difference and ExclusionBy Nikolai Sklobovsky The two modes we are about to explore have the following features in common: They both belong to the same comparative group that makes them neighbors in PS list of layers blending modes; Their effects can be sometimes similar, even with one operating strictly pixel-by-pixel and the other using certain average values; In other cases, especially if any amount of Gray is involved, they can be strikingly different; They are rightly considered by many experts to be the most out there (translation: non-intuitive) ones, especially when it comes to the color images. Lets see how they work.
First of all, lets see what does PS Help system have to say about them: Difference looks at the color information in each channel and subtracts either the blend color from the base color or the base color from the blend color, depending on which has the greater brightness value. Exclusion creates an effect similar to but lower in contrast than the Difference mode. In both cases, blending with white inverts the base color values. Blending with black produces no change. Not much but enough to start. If we put this theory to the test by creating a few lines of text on top of a simple black to-white gradient we can get the first feeling of how they work.
The identical blending modes on top of a colored background, however, deliver a totally different experience.
Our text pretty much lost its original hunter green color and became err, different (I added Drop Shadow style for better visibility).
Which immediately gives us a hint: these modes may work well when we need to put something like a logo or a copyright notice on top of a multicolored image (read: a normal photograph) and guarantee its visibility regardless of its location on the image.
Lets give it a try.
I used a typical photo one would get of a band playing on some county fair. Some highlights, some shadows, some color costumes, some green grass.
We are still using our hunter green text color.
As it was promised, both modes gave similar effect (Exclusion being slightly softer), both inverted text when it came to black or white base.
The situation changes quite dramatically if we use White as a text color.
Now the text really stands out of the background, especially in Difference mode.
Its also easy to see on the bottom part of the letter X that Exclusion mode is somewhat partial to the gray areas.
And if we use Black the text disappears totally, leaving us only with the Drop Shadow style.
Hey, we just learned something!
No need to play with Fill slider if you want shadow only effect. Simply use your standard issue black text with the shadow and set mode to either Difference or Exclusion!
Now, what happens if we set the text mode to Gray?
Look for the first time we can actually see the difference between the two modes.
Difference mode still shows some color-inverting effect, at least when its not on black or white, in which case it remains gray.
Exclusion mode simply stays gray.
This may give us some interesting ideas: what if we blend the whole image with gray?
In Exclusion mode well get just gray. Nothing but gray.
In Difference mode well get some sort of a mix that is half positive, half negative.
The interesting fact: the resulting image stays the same even if you invert the original (Ctrl/Cmd + I), which is only natural if we keep in mind the formula for the Difference mode:
C = abs(A - B).
Since our gray B is exactly in the middle, it does not really matter whether our original A is inverted or not. What is important is how *far* its value is from our gray median.
I only found one mathematical explanation on how exactly the Exclusion mode works, namely in RetouchPro forum, in a nice tutorial submitted by Rexx. It comes complete with the formula and even a graph. Please check the link (Exclusion is described closer to the bottom of the page), its worth it.
I would only like to borrow one paragraph from Rexx, who, IMHO, put it very nicely: If A and B are very different, Exclusion produces white (per channel). If A and B are both very dark or very bright, Exclusion produces Black. If any of A or B is close to gray (128), Exclusion produces gray, no matter what the other layer is. This still leaves a lot of uncharted territory, but at least it gives us few safe anchor points. You can see the confirmation of these rules in the picture of the image blended with itself in Exclusion mode.
As its easy to see, Exclusion Mode really turned out to be a rather wild beast to tame.
I got the feeling that the most of its natural usage lies in the field of channel masking, where its black-gray-white oriented functionality and the three "Rexx Rules" mentioned above would provide at least somewhat expected results.
Other than that, I managed to produce some non-acid colors was when I:
1. Extracted the highlights (Ctrl/Cmd + Alt/Option + ~)
2. Copied them to a separate level (Ctrl/Cmd + J)
3. Inverted them (Ctrl/Cmd + I), and finally
4. Changed the mode to Exclusion.
To see the difference between the result and the original more clearly I also made a mask with a few windows, which I stroke with white and set in Difference mode to guarantee the edges to be always visible :-)
Another, somewhat similar, yet different image was produced when I:
1. Selected highlights again (Ctrl/Cmd + Alt/Option + ~)
2. Inverted the selection (Ctrl/Cmd + Shift + I)
3. Copied the resulting shadows to the new layer (Ctrl/Cmd + J), and
4. Set the mode to Exclusion.
In both cases the resulting image was less saturated than the original.
Exclusive DifferenceAs we predicted from the very beginning, the two modes are hard to call intuitive. Difference mode ended up being simpler of the two, essentially doing what it name implies. Immediate application can include image proofing, black text becoming transparent and white text becoming inverted, and, as such, always visible. Exclusion mode with its highly nonlinear formula and heavy gravitation towards pure gray can be either used for quick-and-dirty gimme some weird colors projects, or, on a much more sophisticated level, for separating shadows, highlights and mid-tones in the channel-based operations.