Astronomers can use the color of an object in space to determine its temperature. Stars are similar to blackbodies, and that the color variation of stars is a direct consequence of their surface temperatures.To estimate the surface temperature of a star,the relationship between the temperature of a blackbody, and the wavelength of light where its spectrum peaks is used.