This is how color vision works: special receptors on our retinas, called opsins, respond to different wavelengths of light; longer waves skew red, while shorter waves are bluish. The retina takes these different color wavelengths and “mixes” them in the underlying nervous system. One receptor activates for blue, and another for red, and the brain sees purple—so long as you have those two different receptors.