Our sun has a surface temperature of about 6000 degrees which makes it yellowish to our eyes. Yet the sun, like all stars, emits light of all colorsnot just the color that it appears to you.