Stable atoms have as many electrons as they do protons. How do these electrons orient themselves around the nucleus? They fill their electron orbitals by the aufbau principle.: The Aufbau Principle - Using the Aufbau Principle
compoundchem: Added a newer, poster friendly version of the Metal Ion Flame Test Colours graphic to the store today! You can view the original post here, which includes an explanation of the origin of the colours.