So the different colours are all points in a 2-dimensional space. Each frequency corresponds to a given point in this space. If you plot all the frequencies from the spectrum they form a curve in this space, which is a semicircular shape. Red is at one end of the arc, and violet is at the other.
But the possible colour aren't just the ones on this arc. We can also see colours that correspond to mixtures of different frequencies. These fill in the inside of the semicircle, creating the full space of possible colours, which looks like this (https://pbbhandarkar.files.wordpress.com/2016/10/colorspace....). The spectral colours are on the arc around the outside, and all the colours on the interior can only be made by mixtures. The line joining red and violet is called the "line of purples". It joins violet back up to red to make a circle, but it consists only of mixtures rather than spectral colours. The spectral colours don't go around in a circle, just a semicircle. We need the line of purples to join it back up.
Given that, violet appears to be between red and blue in the same way the pitch of G appears to be between the pitches F and A.