The calculation is |Upper Layer - Lower Layer|, and the end result will be convert to positive if it is negative.
This mode is useful for color enhancement or special effects.
The result of Difference the different between upper layer value and lower layer value. See the Example shown below:
Instead of immediately showing you how to do a cool layer mode trick that might be rarely use by you, we will explain the true mechanism working behind every layer mode. By fully understanding the fundamental of every layer mode, you will be able to apply layer mode into any problem you might run into when the time come.
Layer mode is about blending the content of two or more layers together to produce intended result. The result of one blending can be both final artistically result or intermediate result that use for further image correction or enchancement.
Layer mode blending the content of layers by calculating the Red, Green and Blue value of every pixels against its lower layer Red, Green and Blue value. Almost all layer mode do calculation on each color channel separately, that is mean upper layer Red value will be only use for calculating against lower layer Red value, and same thing happen to Green and Blue.
While most of the layer mode do calculation on RGB channel, some layer mode do use HSB(Hue, saturation and brightness) for the calculation, e.g. Hue, saturation, color and luminosity mode.