* Electronic Excitation: When a compound containing sodium is heated in a flame, the electrons in the sodium atoms absorb energy and jump to higher energy levels (excited state).
* Emission of Light: As these excited electrons return to their ground state, they release the absorbed energy as light. The wavelength of this emitted light corresponds to the orange-yellow color we see.
* Sodium Dominance: Sodium ions are very efficient at emitting this orange-yellow light. This means that even if other elements are present, the sodium's strong emission tends to dominate the flame color.
* Nitrate and Sodium: While nitrates themselves do not directly contribute to the color, they often contain sodium as a counterion (e.g., sodium nitrate, NaNO₃). When heated, the sodium ions are released and exhibit their characteristic flame color.
Key Takeaway: The orange-yellow flame color is primarily due to the presence of sodium ions, regardless of the specific compound containing them.