How the Bayer Filter Works, and Why Your Camera Sensor Is Colorblind
Every photosite on your camera's sensor is colorblind. A 61-megapixel full frame sensor is a grid of roughly 61 million tiny light meters, and each one reports a single number: how much light it collected during the exposure. It records the brightness and nothing about the color. Left alone, your sensor would only ever hand you a grayscale image.