The color of a potassium nitrate flame would be purple/magenta.
Each cation displays a different color when put in a flame. Lithium salts produce a red flame, while copper salts display a green flame.
Any ionic compound with potassium as a cation will display a purple flame. Therefore, whatever anion of the potassium salt will have no effect on the color of the flame.
Each element has its own characteristic energy levels. When an electron in an atom or ion of the element is excited to a higher level with the heat energy of Bunsen flame, the electron immediately drops back to its ground state. During this process of ‘cooling down’, it emits a photon of comparable energy and if wavelength of that photon falls in the visible region (400-800 nm), a flame colouration is observed. This is a quick and popular way of detecting the presence of certain metal cations in chemical samples. Most of the alkali metals (and some alkaline earths) respond positively to this test. Potassium ion gives off a lilac or pale violet flame coluration corresponding to a wavelength of 770 nm (deep violet when viewed through a pair of blue glass) in this test.
Potassium nitrate contains `K^+` ions and hence should exhibit a lilac flame coloration in this test.