Skip to content

Grayscale Filter

Grayscale Filter
Filters
Mode
Weighted
Factor
1
Normalize
true
Weight Factor
(1, 1, 1)
Previous
null

Category Filters
Is Pair Node: No


Creates a grayscale filter that can be applied to an image. The filter can be customized with different modes and factors to achieve various grayscale effects.

The Grayscale Mode input allows you to choose how the grayscale effect is calculated. The available modes are:

  • Weighted: This mode applies a weighted average to the RGB channels, giving more importance to the green channel, which is more sensitive to human vision. (R: 0.299, G: 0.587, B: 0.114, A: 0)
  • Average: This mode calculates the average of the RGB channels, treating all channels equally. (R: 1/3, G: 1/3, B: 1/3, A: 0)
  • Custom: This mode allows you to specify custom weights for each channel using the Weight Factor input. The values represent the contribution of red, green, and blue channels respectively.


Type: Grayscale Mode (Enum)
Default: Weighted

The mode of the grayscale filter. This determines how the grayscale effect is calculated and applied to the input image.

Type: Double
Default: 1
Min: 0 Max: 1

The factor by which the grayscale effect is applied. A value of 1 means full grayscale, while a value of 0 means no effect.

Type: Boolean
Default: true

Whether to normalize the grayscale values. If true, the grayscale values will be adjusted to fit within the range of 0 to 1.

Type: Vec3D
Default: (1, 1, 1)

The weight factor for each channel in the grayscale calculation. This is used when the mode is set to Custom. The values represent the contribution of red, green, and blue channels respectively.

Type: Filter
Default: null

The previous filter in the chain. It will be applied before the grayscale filter.


Type: Filter
Default: null

Grayscale filter that can be applied to the image