Here's why:
* Color and Temperature: A star's color is directly related to its surface temperature. Hotter stars emit more blue light, while cooler stars emit more red light.
* Spectral Classification: Astronomers classify stars based on their color and temperature. The hottest stars are classified as blue giants and blue supergiants, with surface temperatures reaching tens of thousands of degrees Celsius. Yellow stars like our Sun fall in the middle of the classification, with surface temperatures around 5,500 degrees Celsius.
So, while yellow stars are relatively hot, they are not the hottest. Blue stars are much hotter.