just a few bits to add, some covered before.
The Southern had an interim stage, called "revarnishing", which was a touch-up, often significant and paint as well as varnish, whereas "repainting" was strip right down and start again with undercoat. When red/cream, or plain red for non-corridor, came along around 1950 (it pre-dated Mk1 stock, when the final company designs were being built) the Southern amazingly managed to just Revarnish most stock, still in green. Come 1956, when they were officially allowed green again, they suddenly did Repainting again, of everything in sight! In 1963, when blue/grey was the new standard, it was of course back to revarnishing, pretty much to the end of hauled stock on the Bournemouth line.
The Somerset & Dorset route, Western Region from the late 1950s, nevertheless maintained the longstanding S&D tradition of coaches from the Southern, so they were green to the end, along with locos from the London Midland, which is how responsibilities were divided up in 1930.
The WR was very proprietorial about being allowed chocolate & cream again in 1956, only named trains, for which a large number of new named trains were created

, and they did all the spare stock for these as well, which of course turned up elsewhere. When suppliers like Gloucester RCW built new stock going in to these, Swindon actually sent the paint from their stores to be used, for consistency, apparently an old GWR habit. In fact the paint spec must have been different, because a principal reason for abandoning red/cream so soon was the BR cream was deteriorating prematurely, but the equivalent WR paint lasted a full life.
Besides the final maroon Derby excursion set lasting well into the 1970s, mentioned above, Scotland had an equivalent, the bottom tier Cowlairs Excursion set, which lasted similarly, old early Mk1 SKs. It was the last maroon main line train I saw, and unexpected, working a Saturday lunchtime football excursion from Glasgow into Edinburgh Haymarket in early 1972, presumably one of the Glasgow teams against Hearts. Someone might even be able to cross-reference the actual date.
Blue, initially in the XP64 prototype and then the new standard, arose from a technical advance by ICI Paints at the time, blue was traditionally notorious for fading in outdoor applications, which is why it was so little used elsewhere if not very dark and dreary. It was a pigment fading issue, which the paint manufacturer finally cracked. The newly available colour was just what the designers were looking for, something to symbolise the new railway, which thus went everywhere, coaches, locos, etc.
The GWR railcars initially brought chocolate/cream with them, then in the early 1950s started repainting in the new red/cream. About halfway through this stopped, and changed over to railcar green, this half/half liveried fleet lasted to the end of their use.
Differences in shade arose because the paint was not supplied ready mixed, but as concentrated colour which was then mixed with thinners etc, an advantage of this was when patch-painting older paintwork the painter could vary the shade to match the amount of weathering, a process they were professionally expert in.