Grade node


This documentation is for version 2.0 of Grade.


Modify the tonal spread of an image from the white and black points.

This node can also be used to match colors of 2 images: The darkest and lightest points of the target image are converted to black and white using the blackpoint and whitepoint values. These 2 values are then moved to new values using the black(for dark point) and white(for white point). You can also apply multiply/offset/gamma for other color fixing you may need.

Here is the formula used:

A = multiply * (white - black) / (whitepoint - blackpoint)

B = offset + black - A * blackpoint

output = pow(A * input + B, 1 / gamma).

A special use for Grade is to generate a mask image with soft edges by thresholding an input image. Set the “Black Point” and “White Point” to values just below and just above the threshold, and check the “Clamp Black” and “Clamp White” options. If a binary mask containing only 0 and 1 is preferred, the Clamp plugin can be used instead.

See also: and


Input Description Optional
Source   No
Mask   Yes


Parameter / script name Type Default Function
Black Point / blackPoint Color r: 0 g: 0 b: 0 a: 0 Set the color of the darkest pixels in the image.
White Point / whitePoint Color r: 1 g: 1 b: 1 a: 1 Set the color of the brightest pixels in the image.
Black / black Color r: 0 g: 0 b: 0 a: 0 Colors corresponding to the blackpoint are set to this value.
White / white Color r: 1 g: 1 b: 1 a: 1 Colors corresponding to the whitepoint are set to this value.
Multiply / multiply Color r: 1 g: 1 b: 1 a: 1 Multiplies the result by this value.
Offset / offset Color r: 0 g: 0 b: 0 a: 0 Adds this value to the result (this applies to black and white).
Gamma / gamma Color r: 1 g: 1 b: 1 a: 1 Final gamma correction. Negative values are not affected by gamma.
Clamp Black / clampBlack Boolean On All colors below 0 on output are set to 0.
Clamp White / clampWhite Boolean Off All colors above 1 on output are set to 1.
(Un)premult / premult Boolean Off Divide the image by the alpha channel before processing, and re-multiply it afterwards. Use if the input images are premultiplied.
Invert Mask / maskInvert Boolean Off When checked, the effect is fully applied where the mask is 0.
Mix / mix Double 1 Mix factor between the original and the transformed image.