the sun is yellow or is it you're used to seeing a happy yellow circle floating in a blue sky but that's fake news if you placed a prism in a Sunbeam in space you'd see that the sun radiates light in every color of the visible spectrum if these colors were paints mixed together you'd get black but with light mixing them produces white the true color of sunlight so why does it look yellow to us let's replace the prism with a slice of Earth's atmosphere here nitrogen and oxygen molecules scatter sunlight in all directions this makes
our sky blue as the blue light with shorter wavelengths scatters more than red light if scattering didn't happen the sky would always be a transparent window to the stars but because the sky has taken some of the blue sunlight appears yellow to us the effect is strongest at sunrise and sunset when there's more atmosphere between you and the sun making even red light scatter and dying the sky orange and red light can also be scattered by things like water vapor and so particles making ocean sunsets even more amazing