The scattering effect is more pronounced for shorter wavelengths (blue and violet light) compared to longer wavelengths (orange and red light). This means that blue and violet light are scattered more effectively by the particles in the atmosphere, while orange and red light are transmitted more directly to our eyes.
As a result, when we look at the sky during the daytime, we see the scattered blue light coming from all directions, giving the sky its characteristic blue color. However, when we look directly at the sun, we see the unscattered sunlight, which appears white or yellowish-white since it contains all colors of the visible spectrum in approximately equal amounts.
The yellow appearance of scattered light is particularly noticeable during sunrise and sunset. During these times, sunlight has to travel a longer distance through the atmosphere to reach our eyes. This means that more blue and violet light is scattered away by the increased number of particles encountered, leaving behind a greater proportion of orange and red light. This is why the sun appears reddish or orange during sunrise and sunset.