- GIMP layer modes
Boring... this is the default mode, which uses no equation - the previous layers won't affect the colours of the layer. At 100% opacity, this mode is totally opaque (ie. non-transparent).
Multiply multiplies the lower value with the upper value and divides the result with 255. In practice, it means that all white pixels (value 255) in your layer are invisible, and everything darker than white makes the result darker.
Note that this is per colour channel: if your layer has a red pixel (255,0,0) and the layers below have a grey pixel, let's say (100,100,100), then the resulting pixel will be (100,0,0) - the red channel is unaffected, while green and blue are multiplied by 0.
This is basically the polar opposite of multiply. All the black pixels in your layer are invisible, and anything brighter than black makes the result brighter. Like multiply, this also works per colour channel.
- Hard light
This is basically a combination of multiply and screen. If your layer has a colour value that is below the average (128), then hard light works like multiply, ie. colour values 0-127 work like values 0-255 in multiply mode.
If your layer's colour value is 128 or higher, the mode works like screen, ie. colour values 128-255 work like values 0-255 in screen mode.
In effect: 128 is invisible, anything lower makes the result darker, and anything higher makes the result brighter.
- Soft light/Overlay (Due to a bug, soft light & overlay are in practice identical in GIMP)
Soft light uses a fairly complex equation, so I'm not going to go into that here. Suffice it to say that it's like a "weaker" version of hard light: it affects the colours less strongly. If the lower layers have white or black, soft light won't affect them at all. Grey values are affected most strongly.
Like hard light, on soft light, 128 is invisible, while higher values make the result brighter and lower values make the result darker.
- Grain merge
This is a very useful mode, although it's fairly simple. It takes the value from your layer, substracts 128 from it, so that the value is between -128 and 127, and then adds that to the lower layers' value.
So again, 128 is invisible, while lower values make the result darker, etc.
Grain extract is basically the inverse of grain merge, ie. it's the same as inverting all the values on your layer and then using grain merge.
- The differences between hard light, soft light and grain merge:
These modes all function in similar ways, but there are differences.
Hard light is the most uncompromising and absolute: anything white or black on a hard light layer results in white or black.
Grain merge is a simple addition/substraction, it doesn't care what is under it, it affects everything the same way. However, the differences are more pronounced on darker areas, since the relative differential is higher.
Soft light is like a tender, gentle, hard light - it's like a hard light with self-confidence issues: if anything under it is too strong (ie. black or white) it doesn't dare touch them. The closer the underlying values are to average (128), the stronger soft light affects it.
There are some other layer modes, but I don't use them all that much. Experimentation is the best way to figure out how they function.
First of all, it's important to know how pixels work in a graphics software. Each pixel has 3 colour values, red, green and blue, each has a value between 0 and 255. A pixel with all values at 0 is black, and one with all values at 255 is white.
Layer modes effect how the pixels in a layer are mixed with the pixels of lower layers. Think of each layer mode as an equation that is performed on the pixel values. The layer mode equation is calculated first, and the resulting colours are mixed according the opacity of the layer.
Here are the most important layer modes in GIMP: