Final answer:
Methane in the atmospheres of Neptune and Uranus absorbs red wavelengths and reflects blue wavelengths, giving these planets their blue color. This is due to the selective absorption and scattering of sunlight by methane molecules.
Step-by-step explanation:
The blue color of Neptune and Uranus is caused by methane, which absorbs red wavelengths and reflects blue wavelengths. When sunlight enters the atmosphere of these planets, the methane gas molecules absorb the red light, causing more blue light to be scattered. This scattering of blue light is what gives Neptune and Uranus their characteristic blue hue.
To explain this concept further, when light hits an object, some wavelengths are absorbed and others are reflected. The colors we perceive are the wavelengths that are reflected back to our eyes. In the case of Neptune and Uranus, the methane absorbs the longer wavelengths (red) and does not absorb the shorter wavelengths (blue) which are reflected back and hence observed by us.