RGB Difference Keyer Node

The RGB-Difference-Keyer node allows you to take an input image, and output it with an area of the image filtered out. The area of the image that is filtered out is determined by its colour, referred to as the key colour. This effect is typically used to take photos or live video footage shot against a green or blue screen and filter out the green or blue screen, so that it can be composited against the background.


The RGB-Difference-Keyer node has two image input ports.

If you only use the rightmost image input port, the RGB-Difference-Keyer will take the input image, generate a matte based on how much of the image matches the key colour, and remove the part of the image covered by this matte.

If you use both the left and right image input ports, the RGB-Difference-Keyer will generate a matte based on how much of the left input image matches the key colour, and cut that matte out of the right input image.


Parameter Description
Name Allows you to enter a name for the node.
Key Colour

The colour used to generate the matte. This is used to set the colour of the image background. The matte is extracted by comparing the similarity of colour channel differences between key colour and the pixel colour.

  • Red: The red value of the background colour.
  • Green: The green value of the background colour.
  • Blue: The blue value of the background colour.
  • Alpha: The alpha value of the background colour.

If you click on the colour swatch below the Alpha field, a Colour Picker window will appear. In this video, you can click and drag on the dropper and drop it over a pixel in the background of your photo or video to pick its colour.

NOTE This keyer requires chromatic differences between the red, green or blue colour channels, so greyscale images cannot be keyed using this effect.
Pre-Multiplied Alpha

When checked, the RGB values of the input image are un-premultiplied before they are keyed. The output image is then re-pre-multiplied against the alpha channel.

If the input image has alpha values and is pre-multiplied, this option will prevent the premultiplication from evening out the differences between the RGB channels.

Key Weight Increasing values result in fewer pixels colours being selected in the background.
Background Bias

Increasing this parameter will increase the tendency of the effect to find pixels that match the key colour and to key them out.

Low Intensity Threshold

Increasing this parameter will make the node tend to key out darker pixels.

Blend Input Alpha

When enabled, the alpha values of the input image are carried over to the alpha values of the output image. This option is only useful if the input image contains transparency, and that transparency needs to be preserved.

Despill Matte When enabled, the effect removes the primary channel of the key colour from the edges of the output image, resulting in smoother contours.
Spill Reduction

The amount of the colour key that should be removed from the edges of the output image. A higher setting will make the contours blend in better with the background of the scene.

Replace Colour

If the Despill Matte parameter is unchecked, this colour is used to fill the areas of the keyed matte that are semi-transparent.

Clip Black Determines how much the effect should key out dark pixels.
Clip White Determines how much the effect should key out light pixels.
Invert Output Matte Inverts the matte applied to the output image. When enabled, pixels that are keyed will be opaque, and pixels that are not keyed will be transparent.