grayscale

fun grayscale(r: Double = 0.33, g: Double = 0.33, b: Double = 0.33): Matrix55(source)

Creates a grayscale transformation matrix with the specified red, green, and blue coefficients.

Return

A 5x5 matrix representing the grayscale transformation.

Parameters

r

The coefficient for the red channel. Default is 0.33.

g

The coefficient for the green channel. Default is 0.33.

b

The coefficient for the blue channel. Default is 0.33.