A cytochrome (CYP) gene (CYP305M2) that catalyzes the formation of (Z)-PAOx, a precursor in PAN and HCN biosynthesis from phenylalanine in gregarious locusts, was identified. CYP305M2 is present at barely detectable levels in solitary locusts. Aposematism with PAN can warn and deter consumers from poisoning by HCN generated from PAN. The yellow marker in gregarious locusts denotes the expression of CYP305M2. Against a green background, solitary locusts utilize to predators and are otherwise readily discovered and predated.