This is the first structural colour change in an animal by influencing evolution, researchers said.
The discovery by researchers at the Yale University in US may have implications for physicists and engineers trying to use evolutionary principles in the design of new materials and devices.
"What we did was to imagine a new target colour for the wings of a butterfly, without any knowledge of whether this colour was achievable, and selected for it gradually using populations of live butterflies," said Antonia Monteiro, a former professor of ecology and evolutionary biology at Yale, now at the National University of Singapore.
Little is known about how structural colours in nature evolved, although researchers have studied such mechanisms extensively in recent years.
Also Read
Most attempts at biomimicry involve finding a desirable outcome in nature and simply trying to copy it in the laboratory.
"Today, engineers are making complex materials to perform multiple functions. The parameter space for the design of such materials is huge, so it is not easy to search for the optimal design," said Hui Cao, chair of Yale's Department of Applied Physics, who also worked on the study.
The scientists explained natural selection algorithms can select for multiple characteristics simultaneously - which is standard operating procedure in the natural world.
The desired colour for the butterfly wings was achieved by changing the relative thickness of the wing scales - specifically, those of the lower lamina.
It took less than a year of selective breeding to produce the colour change from brown to violet.
One reason Bicyclus anynana was chosen for the experiment, Monteiro said, was because it has cousin species that have evolved violet colours on their wings twice independently.
"We just thought if natural selection has been able to modify wing colours in members of this genus of butterfly, perhaps so can we," Monteiro said.
The research appears in the journal PNAS.