Quote from : The Disappearing Spoon: And Other True Tales of Madness, Love, and the History of the World from the Periodic Table of the Elements Book

The color of the emitted light depends on the relative heights of the starting and ending energy levels. A crash between closely spaced levels (such as two and one) releases a pulse of low-energy reddish light, while a crash between more widely spaced levels (say, five and two) releases high-energy purple light.