Photosynthesis is the process by which plants, algae, and cyanobacteria use sunlight, carbon dioxide, and water to produce oxygen and energy in the form of glucose. It occurs in two stages - the light reaction phase which is dependent on light, and the dark phase or Calvin cycle which is light independent. The main pigments used in photosynthesis are chlorophyll a and b, which absorb light and reflect green light, giving leaves their green color, and carotenoids which also absorb light. Photosynthesis provides nutrients and oxygen for other organisms.