My impression was it used to be red for democrats until they complained that it was a way to suggest they were communists and it got switched (since nobody associates the republicans with communist)
Pretty much correct.
I thought it was during one of the Reagan elections that the Red=Republican thing was solidified, but it turns out it was in the 2000 Bush v Gore struggle. Before that, the media would switch them arbitrarily, different not only per election but also per media outlet.