It is impossible to give the perfect recovery without knowing something else about the image. Think about this equation:
y = r + g + b;
Easy enough to figure out "y" given the values of "r", "g", and "b"... you just plug them in and you get the value of "y". However, assuming you only have "y", how would you figure out the values of "r", "g", and "b"? You can't because there are multiple solutions. Assuming y = 10, here are some possible solutions:
r = 2, g = 6, b = 2
r = 6, g = 2, b = 2
r = 3, g = 3, b = 4
...
Converting between grayscale (the "y") and color (the "r", "g", and "b") has the same problem. You can convert to grayscale, but you can't convert back to color perfectly.