Color-tuning mechanism of firefly investigated by multi-configurational perturbation method.