Answer:
The different colours produced come from the different wavelength of the spectrum of light as the excited electrons in the metals return to their original state on cooling down.
Explanation:
The flame test is an analytical procedure used to identify different metals by passing them through a flame.
The flame, which is a source of heat energy heats up the metals and excites their outermost electrons which transit to the next energy level. On cooling down, as the excited electrons return to their original state, they emit different colours corresponding to the spectrum of light. Electrons of larger atoms like Barium emit light of higher frequency and lower wavelength and hence exhibits colours closer to the ultraviolet part of the electromagnetic spectrum while smaller atoms like Calcium emit light of lower frequency and higher wavelength and emit light closer to the infrared part of the spectrum
Baruim (atomic number 56) and Calcium (atomic number 20) are both metals in group two of the periodic table.
They both have two electrons in their outermost shell and are represented by Ba²⁺ and Ca²⁺.
When both metals are passed to through the flame test, the two outermost electrons in both metals are excited.
However because the outermost electrons in Barium are farther to the nucleus than those in Calcium, it takes a lesser amount of heat energy to excite them than that of Calcium which is closer to the nucleus.
The spectrum of light which is usually represented by 'ROYGBIV' has the following colours : Red, Orange,Yellow, Green, Indigo and Violet with Red having their highest wavelength (or shortest frequency) and Violet the shortest wavelength (or highest frequency).
Barium's green colour is because it outermost electrons emit light in the range of the Green spectrum of light and calcium's red colour is because its outermost electrons emit light in the range of the Red spectrum of light