How do astronomers know what stars are made of? Through spectroscopy, a technique which divides light in its multiple colors, and then characterizes it accurately.