What is the name of the RGB thing I want to be able to do, and what free program(s) can do it automatically?
Swapping color channels is called channel swap or swizzling. (Searching for "RGB channel swap" brings up lots of relevant results.) Looking at your image, the squares in the right half appear to be flipped across the diagonal.

Most editing apps have a channel mixer tool that allows you to calculate each output color channel as some combination of the input color channels. In Photoshop it's called "Channel Mixer". I've also seen it referred to as "Color Operations" or just "Color Ops". 

The flipping can usually be done with a horizontal flip followed by a vertical flip.