Greyscale
The idea is simple too. We should change original pixel color with the another RGB, - (c, c, c) instead of original (r, g, b) components, - but with the same RGB vector length. Formula for this conversion is:
c = RGB_length * sqrt(3), where
RGB_length = sqrt(r*r + g*g + b*b)