Phenotypic plasticity in pupal colour occurs in three families of butterflies (the Nymphalidae, Papilionidae and Pieridae), typically in species whose pupation sites vary unpredictably in colour. In all species studied to date, larvae ready for pupation respond to environmental cues associated with the colour of their pupation sites and moult into cryptic light (yellow–green) or dark (brown–black) pupae. In nymphalids and pierids, pupal colour is controlled by a neuroendocrine factor, pupal melanization‐reducing factor (PMRF), the release of which inhibits the melanization of the pupal cuticle resulting in light pupae. In contrast, the neuroendocrine factor controlling pupal colour in papilionid butterflies results in the production of brown pupae. PMRF was extracted from the ventral nerve chains of the peacock butterfly Inachis io (Nymphalidae) and black swallowtail butterfly Papilio polyxenes (Papilionidae). When injected into pre‐pupae, the extracts resulted in yellow pupae in I. io but brown pupae in P. polyxenes . These results suggest that the same neuroendocrine factor controls the plasticity in pupal colour, but that plasticity in pupal colour in these species has evolved independently (convergently).