An ordinary filter transmits some portion of the incident light and reflects another portion. A 'blue' filter will reflect the blue-portion of the sunlight and transmit the other colors. This is why, when you look at a blue filter, it looks blue. You are seeing it with the light reflected from its surface. If you were to look through it, however, you would see a scene in which the blue component of the light was removed. As for the yellow sun and the Earth's blue sky, the only direct light we see is when we look right at the sun. The Earth's atmosphere scatters the blue part of the sunlight out of the beam and we see distinctly reddish hues because the thickness of the atmosphere towards the horizon is very high. If we look at the sun high up in the sky, we see that the atmosphere has a blue color because this is the color of the light that is scattered by the atmosphere at 'large angles' from the light source. The color of the sun when you look directly at it is only slightly affected by the atmospheric 'filter' because it is simply not thick enough to be an effective filter like the kind you can hold in your hand. The Sun's color really is yellow, at least so far as retina such as the human kind are concerned!