From this article on hindustantimes.com - Curiosity sends data about Martian surface:
The resultant flash of glowing plasma is viewed by the system’s 4.3-inch aperture telescope, which sends the light down an optical fiber to a spectrometer located in the body of the rover. There, the colours of light from the flash are recorded and then sent to Earth, enabling scientists to determine the elemental composition of the vaporized material.
How do NASA's Curiosity determine the elemental composition of Mars using spectrometer? Do just examining the colors of light enabled scientist to determine the elemental composition of any object?
