The red label for Republicans and blue for the RAT party has always bothered me. The proper color for the RAT party should be communist flag RED. I suspect their allies in their propaganda arm are responsible for the color change.
The connection of Republicans to red and Democrats to blue is a direct result of the 2000 election. Prior to that election, there was no set color scheme for parties - though red was more often connected with Democrats. The use of colors to identify which states were won by which party largely began with NBC News in 1976. They kept a map onscreen during their election coverage which would light up when specific candidates won specific states - Red for Carter and Blue for Ford.
This proved popular and other networks soon followed suit. CBS used the opposite color scheme - red for Republican, blue for Democrat. ABC used yellow and blue in ‘76 and then red and blue in ‘80 and ‘84. By 2000, ABC and CBS had a blue - Democrat, red - Republican scheme. CNN, WaPo and the NYTimes used the opposite scheme. NBC used blue for incumbent and red for challenger.
When the 2000 election wasn’t over in a single day, suddenly the electoral map was everywhere, all the time, and the networks and publications quickly coalesced around the blue - Democrat, red - Republican scheme. Partly this was because NBC’s incumbent - challenger scheme happened to agree with ABC and CBS’ scheme. This also led to the phrases ‘blue-state’ and ‘red-state’ becoming popularized and fixed in the public mindset.
So, essentially it’s dumb luck.