I am a high school student and I am a little confused in a topic, My confusion is that:
We know alkali metals and their salts imparts characteristic color in oxidizing flame, for example: Lithium gives crimson red color, sodium gives yellow , potassium gives violet and Caesium gives blue, My school textbook says that this is because the heat from the flame excites the outermost electron to a higher energy level and when it returns back it will radiate in visible range as I mentioned above, but if this is the correct reason then we know the outermost electron of lithium is the most attracted among all alkali metals .So, it means that it would take high energy to excite its outer electron so a short wavelength of light is needed i.e probably in violet region, so when it returns back it should emit the same wavelength. Then why do we see these weird pattern of colors? I think this is not the complete reason for why do we see those colors? please explain this in brief only so that I can easily understand.