We have merged 3 images into 1 image, but since we only take one channel per image we lose color-information, as the reconstruction shows.
To solve this problem, we can use the Bayer pattern (BG). Instead of storing one whole channel of an image,
we store multiple channel of an image at specific location, giving us the following grid:
When we reconstruct an image, we just have to interpolate the missing colors.
This method can restore the color but note that we had to interpolate some missing colors, meaning all restored images will have worse quality than before.