Elodea cells are green because they contain a functional chloroplast, whereas onion cells are white because they do not have a functional chloroplast. The reason that an elodea contains a chloroplast is due to photosynthesis.
The cells of elodea, which are often classified as waterweeds, photosynthesize because they grow in the presence of sunlight. The cells of an onion, on the other hand, do not photosynthesize because they grow beneath the surface. Elodea cells also contain a vacuole, which is filled with a liquid called cell sap that is primarily made up of water.
The structure of elodea cells also differ from onion cells. Elodea cells are in two layers of varying sizes; one layer is long and narrow, and the second layer is short and wide. Onion cells are larger and are conformed to a single layer.