This shows the dispersion of white light through a prism at various frequencies. The higher the frequency, the more the light gets refracted. As seen below, the further light travels through a medium, (1) the more absorbed it gets and (2) the more it travels in the direction of refraction.
This is also analogous to what happens when light travels through a planetary atmosphere or refracts off the interstellar medium from the light escaping from entire galaxies.



This process being described here also should act as a Universal Low-Pass Filter, perhaps contributing to a small degree to some of the observed universal dopler redshift that astronomers are observing due to expansion of spacetime according to Hubble's Law.
Source: (1) Feynman's Lectures on Physics - Volume 2