Violet Flashlight

Why is it a good idea to put a red lense on your flashlight if you want to avoid being detected at night?
I know red has the longest wavelength and the lowest frequency but I’m looking for a little more information than that.
Would a violet light be just as good? Why or why not?
ps. I’m not looking to rob a bank or anything like that. The question just came up because I have a white and a red light on my keychain and I’ve noticed the difference at night.
The retina of the eye has two basic kinds of light-sensitive cells: cone cells for detecting color and fine detail but which require a fair amount of light to work, and rod cells, which do not detect color but which are very light-sensitive. You owe most of your night vision capability to your rod cells, but these cells are blind to red light. The red light must therefore be fairly bright for the eye to see it.
Although this makes dim red lights less visible at a distance, avoiding detection is not the primary purpose of the red lens. This lens is there so you can turn on your flashlight for reading without temporarily messing up your night vision. You would therefore use a flashlight with a red lens to read your telescope settings and record them while making astronomical observations. Violet, which has a blue component to which rod cells are fairly sensitive, wouldn’t work for this purpose nearly as well.