The surface temperature of a main sequence star is determined by the rate of energy production of its core and by its radius , and is often estimated from the star 's color index . The temperature is normally given in terms of an effective temperature , which is the temperature of an idealized black body that radiate its energy at the same luminosity per surface area as the star . Note that the effective temperature is only a representative of the surface , as the temperature increase toward the core . The temperature in the core region of a star is several million kelvins .