Ok, about 50 years before all photos are only in black and white—you will not see any other colors from the photos. So, you will probably wonder how the digital camera can generate a color image?
The answers are color pixels. Each pixel in the camera has a color sensor, and it will only let in one color based on what it detects. And the color entering is either red, green or blue. The relative density of these three colors will create the millions of colors we see—just like how we mix colors when we are painting.