(20*R + 32*G + 18*B) / 70
which closely matches ITUâR BT.601 luma. Useful for converting colour to a monochrome substitute.
.