Dear student,
Petals surround the reproductive parts of a flower.
Even though they are considered as modified leaves they are not seen in green colour. They do not have chlorophyll pigment.They usually contain pigments like anthocyanin (give red, pink, blue and purple colour), carotenoids (give yellow, orange and red colour) etc.
Petals are usually brightly coloured to attract pollinators like birds, bees etc. They also contain sweet nectar to attract pollinators.
However, plants which are wind pollinated do not have attractive petals, sweet scent or sweet nectar.
Regards.