The alkaline earth metals which do not give colour to flame is:
Ca
Sr
Mg
Ba
Magnesium do not give colour to flame because the electrons in magnesium are too strongly bound that it cannot get excited by flame.