ColorMatrix.grayscale constructor
ColorMatrix.grayscale()
Returns a grayscale transform using sRGB luminance coefficients.
Implementation
factory ColorMatrix.grayscale() {
const r = 0.2126;
const g = 0.7152;
const b = 0.0722;
return ColorMatrix(const <double>[
r,
g,
b,
0,
0,
r,
g,
b,
0,
0,
r,
g,
b,
0,
0,
0,
0,
0,
1,
0,
]);
}