The first thing that must be understood is that "color" is a psycho-physical phenomenon, and its *perception* by humans is dependent on 2 systems: the electromagnetic wave/photon (i.e., light) receptors of the retina, and the processing of the output from those receptors by the brain. Normally, humans have these receptors (called "cones" by physiologists) that are tuned to have a maximum transfer function (i.e., how much output gets generated per input) at 3 specific wavelengths of light, that are recognized as being "red", "green" & "blue". Photons of light have a specific wavelength associated with them (i.e., in whatever relativistic reference frame an observer is in), and each photon of a specific frequency generates a specific output for each of these 3 tunings of receptors, and thus, there is a 3-D vector space for the receptors' output. The brain processes this triple coordinate as being a total "color". If the coordinates all the have same value, the brain processes it as "white" of some type (including "grey"); if the coordinates are very high in only one of those coordinates, the brain processes it as the respective color (including a darker shade).
Unless one is looking at the output from a laser device, the light that any set of receptors observe is in the form of many individual wavelengths that can be approximated as a continuous spectrum. This spectrum is in essence the "true color" of any light, with the cones & brain mapping that out to some "perceived color". To a certain level of accuracy, there are infinitely many combinations of individual wavelengths, each at some intensity, that is perceived by any particular brain as the same exact color; this is the reason why television works - a real spectrum is observed by an camera, which then produces a 3-D vector space signal that can be displayed by a display device, which a viewer would perceive in 3-D vector space as being the same as what would be perceived if viewing that original spectrum. As one might expect, this 3-D signal is best matched to human color perception by matching up with the wavelengths that correspond to the cones' maximum transfer functions, and is the reason why color is regarded as being a RGB (red-green-blue) coordinate.
There is a class of spectra called pure color (maybe it is called something else) in which the spectrum is only a single wavelength; such spectra is perceived by the brain as having a certain 3-D color coordinate value, and typically a display cannot reproduce such a spectra (except for those spectra that exactly match the output spectra of the individual display). However, these pure colors basically map to a 1-D curve within the 3-D vector space (or 2-D if intensity is normalized); there are plenty of other colors that the human color perception perceives, but these are artificial colors. A lot of these colors are close to a true color, but there is one particular section of color that is totally artificial - the colors from purple to red, which is due to the fact that the mixture of pure colors must be between these 2 colors, but yet not be along the pure color spectrum. A prism separates out light because the index of refraction is slightly different for different wavelengths; the glorious natural phenomenon of a rainbow has the same mechanism, although the particulars of geometric optics that makes it so is quite an interesting topic in its own right.
Now, as for the OP's original question of there being "6 colors", typically being in order along the pure color spectrum as violet, blue, green, yellow, orange, red, that is just perception as the brain has a hard time picking out any more of a fine gradation of colors. Now this might be my opinion, but when I look at a rainbow, I tend to notice a very large section between blue & green, that is typically know as cyan, so I would say that there really are 7 colors, not 6.
Hope this helps.