Viewing a single comment thread. View all comments

Pleasant_Carpenter37 t1_j25w2gb wrote

You know how fireworks flash different colors? We put different things in the fireworks to make different colors. Aluminum burns white, barium burns green, etc.

The same thing is true in stars. We basically look at the light coming from a star, count up the mixture of colors we see, do some complicated math, and that gives us an estimate of what it's doing.

If you want more detail than my crude eli5 can give you, read up on spectroscopy.

5