Violet is spectral: it's a frequency at the short end of the spectrum, and a shorter frequency than our blue cone cells are tuned to detect. So really it should appear dark blue, but in fact when we look at it the red cones, which are activated by long wavelengths, send some amount of signal too. This is due to a bug.
Purple, meanwhile, is a genuine mixture of short and long wavelengths, causing the same response.
I am fascinated by the quirk that our red cones also slightly perceive light beyond blue. Thanks to this quirk we can have the model HSV which wraps around the red hue to magenta and then blue. This is only possible because of this quirk.