Specimens turn darker most of the time. However, if you want to inhibit this process as good as possible, there are several techniques, which aren't always available to anyone. Most have something to do with quick desiccation, as rotting is only possible when water is available.
1. Preserve the mantid in alcohol for some days. Disadvantage: green color vanishes, but rotting is prohibited.
2. Don't let the mantid die a natural death, as rotting starts immediately when the animal dies, before you see and remove it. If you want to pin a mantid, kill it under controled conditions. If you see the mantid getting old and loose tarsi, sometimes hanging on just a few legs for some days, this is the moment to do it.
3. In females: remove the abdominal guts. Don't scratch a lot, though, as damaging the muscles will destroy the color.
4. Dry it quickly after pinning. Three methods are applied: i. a ventilated oven around 50° C for about 4 hours, repeated twice. If the oven isn't ventilated it doesn't work properly. ii. silica gel, in which the pinning board is sealed for one or two weeks. You need a box larger than the pinning board and a lot of silica gel. iii. the most elaborate method, available only to the ones with either a lot of space and/or money: a vacuum freeze drier. It yealds the best results, but who can afford one?