In TNG and after, *green and red were swapped for some reason.
*Yellow (TNG didn't use green alternate)
And it was because Stewart didn't look good in yellow.
I've also heard it was because red for the captain was a link to the ST2+ movie jackets. Anything definitive on that?
I think that was more a rationalization created among the fans. Patrick Stewart did do camera tests in a gold uniform, and it was decided he didn't look good in the gold uniform, so they swapped the purposes of the red and gold.