Scientists have discovered how locusts change their body color to adapt to different environments.