Why the flowers are in different colours when the leaves of almost all the plants are green?
Great question! Chemically, I do not know what causes the colors. But if you consider that flowers are how some (not all) plants reproduce (they contain the sperm & ovaries of the plant), it’s easy to understand that flowers are an attempt to attract pollinating insects and birds, by being colorful and smelling good (or in some cases, really really bad).