There are a few ways amateur astronomers can get spectral information about celestial bodies. One way is to use a spectrograph, a tool that helps to spread the light from a celestial body into its different colors. By looking at the colors, astronomers can learn about the object's chemical makeup. Another way is to use a filter, which allows astronomers only to see a specific color of light. This can also be used to learn about the chemical makeup of an object. Here2 is a guide on capturing the spectra of stars using a DSLR or a small telescope.