The Sun is “white,” but when viewed from Earth it appears somewhat yellowish due to an optical effect that occurs when its light passes through the atmosphere. Let’s see…
In our eyes there are cells that are sensitive to light, and they come in three “types” so to speak: There are cells that react to red light, others to green light, others to green, others to blue. However, it can happen that more than one cell type is activated at the same time, and even all at the same time. Our eyes then perceive white.
If we could look at the sun from a point in space, this is what would happen: the sunlight would activate all of these cells in our eyes and we would see them white.
Except no one looks at the sun from space except astronauts (the lucky ones!). We see it on the cow floor. And there its light must have penetrated all the gases in the atmosphere. This includes the famous “ozone layer,” which removes some of the blue light and scatters it in all directions – which is why the sky is blue during the day.
Ultimately, the result is that the sunlight that reaches us loses a little of its blue, resulting in a “mixture” that our eyes perceive as slightly yellowish.