Dear Student,
Chlorophyll is necessary for a plant to perform photosynthesis. Chlorophyll reflects green color, so the leaves appear green. Generally, green parts of plants perform photosynthesis due to presence of the green pigment chlorophyll.
The other-colored leaves also contain chlorophyll but this pigment is masked by some other pigment. That is why even the non-green parts that contain chlorophyll perform photosynthesis.
Regards