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
0.3086*R+0.6094*G+0.0820*B // Paul Haeberli
(max(R,G,B)+min(R,G,B))/2// HSL
max(R,G,B) // HSV (Maximum)
[R,G,B].sort()[1] // Median
RGB2XYZ([R,G,B])[1] // CIE-XYZ (linear)