In days where in nearly every pocket there's a digital camera, it is important to remember that a defining moment that enabled all those small cameras as well as much bigger ones such as the Hubble telescope, was way back in 1969, when Willard S. Boyle and George E. Smith invented the CCD (Charge Coupled Device) in Bell Labs in New Jersey.
A matrix of pixels get hit by light and produces electrons, thus getting a charge, which is then turned into digital data by measuring the voltage of each pixel.
Even though each pixel is monochromatic, by laying down a color-pattern filter, each pixel gives a reading for a specific color. Several adjacent cells are combined together to form a full spectrum pixel.
Now derivatives of that forty year old invention are in cellular phones, cameras of all sizes, and enables space exploration, from the Hubble telescope which shows us the universe in ways we didn't see it before, to unmanned missions to planets in our solar system, sending detailed pictures back with crucial data for future manned missions.