Wavelengths of colors emitted by alkali metals during flame test
The NCERT textbook is partially wrong for elements after sodium. The flame colors and wavelengths do not match. Keep in mind that for alkali metals, the Bunsen burner flame shows multiple wavelengths for potassium, rubidium and cesium.  It is very easy to excite their outermost electron in such a low temperature flame to higher energy levels. My point is that the table should mention multiple lines for K, Rb and Cs.
What you textbook is showing is showing the wavelength of the strongest intensity for all elements except Cs.
The strongest lines or the so-called resonance lines for the alkali metals are
Li = 670 nm (falls in the red region)
Na = 589 nm (orange-yellow)
K  = 769 nm (deep deep red)
Rb = 780 nm and 794 nm  (still deep red)
Cs = 852 and 894 nm (near infrared, not visible to human eye)
Now you are right, K flame appears violet to us and Cs is indeed blue. As stated above, potassium salts in Bunsen flame also show
K = 404 nm (deep violet)
Now violet and red wavelengths appear somewhat lilac to us.
The same goes for Cs, the strongest emission is near infrared, but the visible spectrum has a faint line of 455 nm - this is bluish. Hence the flame appears blue. The name Cesium also comes from bluish gray. Rubidium comes from red from its red lines in the spectrum.
The source of wavelengths is a very old book by Grotrian.
The Bunsen flame spectrum of Lithium and Sodium is pure Li and Na spectrum. The sodium line is a doublet. I could not find the experimentally measured emission spectrum of K, Rb, and Cs.