The color of light a star emits is related to its temperature. This means that we can determine the effective temperature of the Sun by measuring the amount of light it emits at each wavelength and comparing the resulting spectrum we see to models. Another approach is to record which absorption lines are present in the solar spectrum and determine their strengths; both the elements present and their strengths are sensitive to temperature. These different methods all show that the effective temperature of the Sun’s surface is around 5,800 kelvins (9,980 degrees Fahrenheit [5,520 degrees Celsius]).
So although the Sun’s corona at a temperature of over a million kelvins (1,800,000 F [1,000,000 C]) is significantly hotter than the photosphere, the vast majority of the light we use to measure the effective temperature of the Sun comes from its photosphere. The contribution from the corona is minuscule in comparison.