Artificial intelligent assistant

Is the colour of a chrysalis predetermined? Usually, chrysalis of butterflies camouflages with the surface it is attached to, for protection, as I understand it. There are exceptions, though; For example, the golden chrysalis of _Euploea core_ is reflective and literally pops out of its background. My point is, what is the evolutionary advantage of that? ![enter image description here]( Edit: user - _personjerry_ pointed out that shiny colours indicate poison. So the main question now is, if the aim _was_ to scare off predators, why aren't they **red/black** in colour (as red _means_ impending danger in the animal world)? Also, wouldn't developing a red pigment be much easier? In these cases, is the colour predetermined?

Generally, in biology nothing is **designed** but if something is working it is saved for the future generations. Chemistry of colors is a complicated field, you can't just slightly modify single "color" molecule to get any color you want. Maybe in chemical sense the material of this shell can be easily modified to get shiny. Suppose it happened occasionally once due to sporadic mutation and no one dared to eat this chrysalis, which gave abundant progeny.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 1fa9882b7b402f11e1532ceff9bfd4e0