Because virtually every star in the universe emits light as if it were a blackbody. This simple fact allows us to diagnose a great many properties of stars, even at great distances. Because it emits energy at the same rate it absorbs energy, it is in equilibrium with all internal and external sources of energy. Because it is in equilibrium, its maintains a constant surface temperature . The spectrum emitted by a blackbody is a continuum .
Composition has no effect on the blackbody spectrum.
The hotter the blackbody, the bluer its peak wavelength and the bluer its overall color. The cooler the blackbody, the redder its peak wavelength and the redder its overall color. The rate at which the blackbody emits energy at any and all wavelengths from a given area on its surface increases as the surface temperature increases, and decreases as the surface temperature decreases. The faster the rate at which a blackbody emits energy from a given area on its surface, therefore, the hotter its surface. Conversely, the slower the rate at which it emits energy from a given area on its surface, the cooler its surface temperature and the redder it is.