Opponent-process theory (https://psyc.ucalgary.ca/PACE/VA-Lab/colourperceptionweb/the...) says that the eye converts the three wavelength inputs into six orthogonal axes (dark-bright, yellow-blue, red-green). From these axes we get the four primary colors: red, yellow, green, blue. Of course things are never so simple. There are various attempts to measure the perception of color (https://www.handprint.com/HP/WCL/vismixmap.html#ncs), and none of them place red-yellow-green-blue exactly along the axes.