just like our pupils increase or decrease according to the amount of light the eye receives, praying-mantis eyes get darker as light fades. I don't know what process makes them dark but you just need to know that it's natural and it's made for mantids to see better in the dark.