It has to do with the balance of protein in the feed, if I remember correctly... corn has a different balance of amino acids, and is missing some essential ones. A feed with a high proportion of its protein from corn (and not enough other balancing proteins, eg. from fish meal or animal sources) can cause purple barring. So can too much scratch grain. A feed with a good balance of protein (and adequate amounts of protein) would give a green color.
This year I tried separating out a couple of my cull cockerels at about 12 weeks old, to try "fattening" them for two weeks on grain. Later I relented and decided to keep one of them. You can see the change in his feathers from when he went to balanced, high protein grower feed, to a corn, wheat and milk based diet, sometimes just corn. The feathers go abruptly from green, to purple, and even a band of bronze. I thought the milk would help make up the deficit but it seems not much.