"A special hormone -- juvenile hormone -- keeps larvae of the butterfly Papilio xuthus, which is commonly found in Japan, in their black and white bird-excrement camouflage. As they reach the last stage of caterpillar development, levels of this hormone drop, triggering a transformation into the green leaf phase.
Juvenile hormones are known to regulate many aspects of insect development including molt -- when an insect sheds its outer shell -- and metamorphosis -- as when a caterpillar becomes a butterfly, he said."Our Spicebush Swallowtail has a similar conversion in its final instar (larva) and posibly could share this mechanism. The common Giant Swallowtail Butterfly (Papilio cresphontes) which I mentioned in the May 19th blog is in the same genus, but doesn't change color in the final instar. (Picture from Whatsthatbug.com) The large bird poop-like caterpillar is famous for its prominent stink glands, called osmetria, which protrude when it is threatened. This appearance has given it the name "Orange Dog". There is a lot of information on its entire life cycle at mybutterflyguide.com.
There will be multiple stages of the Giant Swallowtail's life cycle available at the Butterfly House at Close Gardens.