Here's how it works:
* Hotter stars emit more blue light. This is why the hottest stars appear blue-white.
* Cooler stars emit more red light. The coolest stars appear red.
* Stars with intermediate temperatures emit more yellow light. Our Sun, with a temperature of about 5,500°C, falls into this category.
Here's a breakdown of the colors and corresponding temperatures:
* Blue-white: Over 25,000°C (45,000°F)
* Blue: 10,000°C to 25,000°C (18,000°F to 45,000°F)
* White: 7,500°C to 10,000°C (13,500°F to 18,000°F)
* Yellow: 5,000°C to 7,500°C (9,000°F to 13,500°F)
* Orange: 3,500°C to 5,000°C (6,300°F to 9,000°F)
* Red: Under 3,500°C (6,300°F)
Remember that this is a simplified explanation. There are other factors that can influence a star's color, including its composition and distance from Earth.