Primary colors are those that can not be made using other colors. They are the "base" for all other colors. Purple is not a primary because you use red and blue to make purple (the shade depends on how much of each you use)
Blue red and yellow are primary colours in material colouring. Red blue and green are primary colours in light, because when all three are shined together they make white, and the three colours together can make any other colour
because it can be reduced to primary colors in visible light spectrum. those being red and blue. that makes purple a secondary color. after secondary colors come the tertiary colors. this means colors that are blends of at least three.