I've never seen Star Trek TOS so I don't know for sure if this is explained anywhere. Does anyone know why they made the switch from red shirts to yellow shirts between commanding officers and security between TOS and TNG?
In reality there isn't an in-universe explanation but out of universe it might have been because of colors looking better on people (all from skimming this)
Yeah, it was largely Patrick looked better in red. Likewise under the new system Data was supposed to be in red, but it clashed with his makeup so they put him in gold.
It's acknowledged in universe but they've never said why. Just "back then it was the other way around".
No doubt fans back then were angry at the unexplained canon change.
I've heard that Data was originally going to be a science officer and the blue uniform didn't work with his makeup, but I don't know whether or not it was true.
Militaries change uniforms all the time, sometimes arbitrarily. Some board comes up with the change and then everyone complains or makes fun of it at first and then eventually everyone just accepts it. Also, there were at least 3 uniform changes between TOS and TNG that we know of. The ones we’ve seen before TNG (ST2-ST6) are all red.
And I think that sheds some light on it. Lots of positions were not red like enlisted officers white engineering uniforms, so it was really only all red for officers. If the highest ranked were red, then they go back to multiple colors, it would make sense for the command cluster to keep red.