The moon is not yellow, but appears to look yellow when it is positioned high in the sky. For example, when the moon is low in the sky, it is being viewed through the most atmosphere and appears more red. As it moves higher into the sky, the amount of atmosphere that it is viewed through is lessened, making it look more yellow.
To see the true color of the Moon, it has to be viewed from space. This is the only way to view the moon without the atmosphere of the Earth causing it to look different colors. Pictures that are taken from outer space show the moon as gray. This is due to the elements out of which the surface of the moon is made. According to NASA, the surface of the moon is mostly made of iron, magnesium, oxygen, aluminum, silicon and calcium.
The rocks on the moon also differ in coloring depending on the elements from which they are made. Most of the darker rocks on the moon are pyroxene, while the lighter ones are plagioclase feldspar. There are some rocks that are brought to the surface from deep inside the Moon that are green in color.