How does the surface temperature of a star relate to its observed color?

Answer

A hotter star appears bluer or whiter.

The temperature of a star is directly linked to the light it emits; as surface temperature decreases from O to M along the spectral sequence, the star's color shifts toward the red end of the spectrum.

How does the surface temperature of a star relate to its observed color?
astronomytemperaturestarsstellar evolutioncommonality