The temperature of a star refers to its surface and that is what determines its color. The lowest temperature stars are red while the hottest stars are blue. Astronomers are able to measure the temperatures of the surfaces of stars by comparing their spectra to the spectrum of a black body.