Converting an image into RGB to grayscale is relatively easy, just do a linear (or average) combination of the 3 channels. For example:
Gray = 0.3*R +0.59*G +0.11*B
By the above expression you get a matrix in shades of gray.
My question is: how do you get the R, G, and B matrices from the Gray matrix to get a color image from a grayscale?