Some species will change to favour their surroundings (
Pseudocreobotra sp etc) others use humidity as a guide (
Miomantis sp etc) and others use light levels (
Sphodromantis sp etc) and some just seem to defy all reasoning! there maybe other types of polymorphism ?
Obviously in captivity there are other factors that will ultimately change your results ie tungsten light (unnaturally low and drying light) low light, ambient temps and humidity possibly even food or lack of wild variety. What ever the reasons mantids kept in captivity in seemingly identical conditions can differ greatly in their colours but in the wild it has been shown to be that the major factors in mantid polymorphism are light level (natural uv), humidity and back ground colour.
With humidity obviously comes plant growth so it pays to be able to change colour to suit your background hence green in high humidity and various shades of brown as humidity decreases.
Light levels also affect certain mantids, the theory being high light levels equal no or low amounts of cover (leaves) so a mantis is most likely to change to brown to suit its immediate environment. low light would therefore equal more cover and a mantids best interest would be to change to green as soon as its next moult.
Other mantids, notably the flower mimics are more cryptic if they can change to suit the colour of the flowers they are on or near too,
Hymenopus coronatus is limited to the best of my knowledge to pink and white which are the colours of the flowers found were they are but
Pseudocreobotra whalbergii etc are more variable with greens, whites, reds & purples, no blue apparently, shame.
Other species only really change hues ie light or dark brown and variations in between
Deroplatys desiccata
Fire melanism is covered in this thread
http://mantidforum.net/forums/index.php?showtopic=11332 page 2 or 3 i think