# Blending Modes

Blending modes are a little difficult to explain. Basically, when one layer is above the other, the computer uses a bit of programming to decide how the combination of both layers will look.

Blending modes can not just apply to Layers, but also to individual strokes.

## Normal

Let's start explaining with the Normal Blending mode: As you may have guessed this is the default Blending mode for all layers.

In this mode, the computer checks on the upper layer how transparent a pixel is, which colour it is, and then mixes the colour of the upper layer with the lower layer measured by transparency.

## Arithmetic

These blending modes are based on simple maths.

Adds the numerical values of two colours together:

Yellow(1,1,0)+Blue(0,0,1)=White(1,1,1)

Red(1,0,0)+Grey(0.5,0.5,0.5)=Pink(1,0.5,0.5)

### Divide

Divides the numerical value from the lower color by the upper color.

### Inverse Substract

This inverts the lower layer before substracting it from the upper layer.

### Multiply

Multiplies the two colors with each other, but does not go beyond the upper limit.

This is often used to color in a black and white lineart. One puts the black and white lineart on top, and sets the layer to 'Multiply', and then draw in color on a layer beneath. Multiply will all the colour to go through.

White(1,1,1)xWhite(1,1,1)=White(1,1,1) White(1,1,1)xGrey(0.5,0.5,0.5)=Grey(0.5,0.5,0.5) Grey(0.5,0.5,0.5)xGrey(0.5,0.5,0.5)=Dark grey(0.25,0.25,0.25)

### Substract

Substracts the top layer from the bottom layer.

EX:

White(1,1,1)-White(1,1,1)=Black(0,0,0)

White(1,1,1)-Grey(0.5,0.5,0.5)=Grey(0.5,0.5,0.5)

Grey(0.5,0.5,0.5)-Grey(0.5,0.5,0.5)=Black(0,0,0)

## Darken

### Burn

A variation on Divide, sometimes called 'Color Burn' in some programs.

This inverts the bottom layer, then divides it by the top layer, and inverts the result. This results in a darkened effect that takes the colors of the lower layer into account, similar to the burn technique used in traditional darkroom photography.

### Darken

With the darken, the upper layer's colors are checked for their lightness. Only if they are darker than the underlying color on the lower layer, will they be visible.

### Gamma Dark

Divides 1 by the lower layer, and calculates the end result using that as the power of the upper layer.

### Linear Burn

Adds the values of the two layers together and then inverts them.

## HSI

HSI is a color coordinate system, using Hue, Saturation and Intensity to catagorise a color. Hue is roughly the wavelength, whether the colour is red, yellow, green, cyan, blue or purple. It is measure in 360°, with 0 being red. Saturation is the measurement of how close a color is to grey. Intensity, in this case is the tone of the color. What makes intensity special is that it recognises Yellow(rgb:1,1,0) having a higher combined rgb value than blue(rgb:0,0,1). This is a non-linear tone dimension, which means it's gamma-corrected.

### Color HSI

This takes the Intensity of the colours on the lower layer, and combines them with the Saturation and Hue of the upper pixels.

## HSL

HSL is also a color coordinate system. It describes colors in Hue, Saturation and Lightness. Lightness specifically puts both yellow(rgb:1,1,0), blue(rgb:0,0,1) and middle grey(rgb:0.5,0.5,0.5) at the same lightness(0.5).

### Color HSL

This takes the Lightness of the colours on the lower layer, and combines them with the Saturation and Hue of the upper pixels.

## HSV

HSV, occasionally called HSB, is a color coordinate system. It measures colors in Hue, Saturation, and Value(also called Brightness). Value or Brightness specifically reffers to strength at which the pixel-lights on your monitor have to shine. It sets Yellow(rgb:1,1,0), Blue(rgb:0,0,1) and White(rgb:1,1,0) at the same Value(100%)

### Color HSV

This takes the Value of the colours on the lower layer, and combines them with the Saturation and Hue of the upper pixels.

## HSY

HSY is a color coordinate system. It catagorises colors in Hue, Saturation and Luminosity. Luminosity is based on scientific studies of how much light a color reflects in real-life. Unlike the others it's linear, and while like intensity it acknowledges that Yellow(rgb:1,1,0) is light than blue(rgb:0,0,1), it also acknowledges that Yellow(rgb:1,1,0) is bright than Cyan(rgb(0,0,1), based on these studies.

### Color HSY

This takes the Luminosity of the colours on the lower layer, and combines them with the Saturation and Hue of the upper pixels.

## Lighten

Blending modes that lighten the image.

### Color Dodge

Similar to Divide. Inverts the top layer, and divides the lower layer by the inverted top layer. This results in a image with emphasized highlights, like Dodging would do in traditional darkroom photography.

### Hard Light

Similar to Overlay. A combination of the Multiply and Screen blending modes, switching between both at a middle-lightness.

Hard light checks if the colour on the upperlayer has a lightness above 0.5. Unlike overlay, if the pixel is lighter than 0.5,it is blended like in Multiply mode, if not the pixel is blended like in Screen mode.

Effectively, this decreases contrast.

### Lighten

With the darken, the upper layer's colors are checked for their lightness. Only if they are Lighter than the underlying color on the lower layer, will they be visible.

### Linear Dodge

Put in for compatibility purposes.

### Linear Light

Similar to overlay.

Combines Linear Dodge and Linear Burn. When the lightness of the upper-pixel is higher than 0.5, it uses Linear dodge, if not, Linear burn to blend the pixels.

### Screen

Perceptually the opposite of Multiply.

Mathematically, Screen takes both layers, inverts them, then multiplies them, and finally inverts them again.

This results in light tones being more opaque and dark tones transparent.

### Soft Light(Photoshop) & Soft Light SVG

These are less harsh versions of Hard Light, not resulting in full black or full white.

The SVG version is slightly different to the photoshop version in that it uses a slightly different bit of formula when the lightness of the lower pixel is lower than 25%, this prevents the strength of the brightness increase.

### Vivid Light

Similar to Overlay.

Mixes both Color Dodge and Burn blending modes. If the color of the upper layer is darker than 50%, the blending mode will be Burn, if not the blending mode will be Color Dodge.

## Mix

### Allanon

Blends the upper layer as half-transparent with the lower.

### Alpha Darken

As far as I can tell this seems to premultiply the alpha, as is common in some file-formats.

### Behind

Does the opposite of normal, and tries to have the upper layer rendered below the lower layer.

### Erase

This substracts the opaque pixels of the upper layer from the lower layer, effectively erasing.

### Geometric Mean

This blending mode multiplies the top layer with the bottom, and then outputs the square root of that.

### Grain Extract

Similar to substract, the colors of the upper layer are substracted from the colors of the lower layer, and then 50% grey is added.

### Grain Merge

Similar to addition, the colors of the upper layer are added to the colors, and then 50% grey is substracted.

### Normal

The standard blending mode. This looks at how transparant a given pixel is, and mixes the upper layer with the lower according to that.

### Overlay

A combination of the Multiply and Screen blending modes, switching between both at a middle-lightness.

Overlay checks if the colour on the upperlayer has a lightness above 0.5. If so, the pixel is blended like in Screen mode, if not the pixel is blended like in Multiply mode.

This is useful for deepening shadows and highlights.

## Negative

These are all blending modes which seem to make the image go negative.