The different colours of flowers of mainly come from pigment called anthocyanins. Chlorophyll is the well known pigment which give green colour. Also there are so many pigment which give different colours to different thing's.
And similiar to people's plants also carry there genes which deceides there colour. There are some inscets or birds which are attracted to dark colour. There dark or dull colour depends on Genetic. The colours of flower make reproduction and survival possible.
By attracting insects birds to carry pollen for reproduction from one plant to another by repeating the process.







