Respuesta :

flook
Think of it like fire. Different colors of fire have different temperatures...
I quoted this from www.answers,
"The hotter the star the more it appears blue, the cooler … a star the more it appears red. Generally, the larger the star, the hotter it will be, but there are exceptions."
Also, you can think of it like this... when you put pictures under a certain camera, it can pick up on the change in temps, and different temps will have different colors