The sky burns orange at sunset while the Sun’s surface keeps radiating almost the same spectrum. The color shift happens in the atmosphere, not in the star. As sunlight travels through a longer path of air near the horizon, gas molecules and tiny aerosols act as a selective filter for different wavelengths.
This filter is governed by Rayleigh scattering, a process whose intensity scales inversely with the fourth power of wavelength. Shorter blue and violet light scatter out of the direct beam into the wider sky dome, raising the optical depth along the line of sight. Longer red and orange wavelengths suffer less attenuation and dominate the transmitted light that reaches an observer when the Sun sits low.
Mie scattering by larger particles can further modify the spectrum, flattening the contrast or deepening reds depending on particle size distribution and concentration. The photosphere still emits a near blackbody spectrum set by its effective temperature. What changes is the transmission function of Earth’s atmosphere, which rewrites the apparent color palette of the setting Sun.