maxWidthHeight:: grayscale:: linearGamma:
srcCanvas
(R + G + B) / 3
R/4 + G/2 + B/4 // Y(CgCo)
0.299*R+0.587*G+0.114*B // BT.601
0.30*R+0.59*G+0.11*B // Japan analog TV
0.3*R+0.6*G+0.1*B // BT.601 rough
0.2126*R+0.7152*G+0.0722*B // BT.709
(max(R,G,B)+min(R,G,B))/2// HSL
max(R,G,B) // HSV
[R,G,B].sort()[1] // Median
G // Green only
RGB2XYZ([R,G,B])[1] // CIE-XYZ (linear)