The colors of the fireworks come from the energy difference between the allowed transition levels of atoms of different metals that are used usually as salts to made the fireworks. The most common colors are also seen when a metal or a salt of it is thrown over an open flame. The electrons become excited and by dezexcitation to inner energy levels they emit light.
The most common two colors that anyone knows are the yellow line of sodium (Na) and the blue color of copper (Cu). When throwing common salt (NaCl) into the flame the yellow color is obtained. It is well known the nice blue color of CuSO4 popular known as the blue-stone. Also the copper acetoarsenite (known as the Paris Green) has a nice blue-green color.
The violet-pink color is also a fairly easy to obtain color. It is present in the potassium atom (K) emitting spectrum. Thus if one burns KNO3 which is a very strong oxidizer used in the black powder composition, he will obtain the violet pink color. There are also some metals from the subgroups of La or Ac (rare earths) that have in their emission spectrum the pink color. These metals were generally used in the manufacture of color TV cathode ray tubes.
The orange color is usually obtained from calcium salts especially from gypsum (CaSO4*2H2O) or Calcium Chloride (CaCl2). The last color, red is also the most difficult to obtain. Usually there are used salts of Strontium (Sr) or Lithium (Li).