It's rainbow if we skip coloring 1 and 5 and color them with grayscale instead.
Here's the question. If we can allow one color not to be "colorful" (chromatic), what pitch would that be? It's the tonic (pitch 1).
If we allow two such colors? 5 is a good candidate, it's present in almost all popular scales. (Locrian isn't very popular.)
The rest 10 colors go in rainbow by thirds, as you proposed.
So, using two grayscale colors, I've reduced the demand to make distinct enough color palette from 12 colors to 10 chromatic + 2 grayscale.
Which (10), in my experience fighting with different screens and projectors, is almost the limit of having something stable, distinguishable, nameable and memorable.
I would imagine that would be red(1), orange(3), yellow(5), green(7), blue(2), purple(4)
But it seems you have white(1), green(3), grey(5), yellow(7), red(2), purple(4)
I can't quite see what going over the rainbow in thirds here means, but I can see why a fifth would be neutral. Could you expand upon this?