Like everything else in the military, Unification completely screwed up any traditional association between colour and trade with respect to berets. The only exception were the airborne and the armoured.
The beret was first adopted by Canadian tankers well before WW II, in black, aping the Royal Armoured Corps beret.
In 1943, the khaki beret was introduced throughout the Army to replace the khaki Field Service Cap (a wedge cap very much like the one worn by Air Cadets today). The Canadian paratroopers adopted the maroon beret during WW II as well.
Postwar, certain regiments adopted certain colours; I think the Westminsters were associated with a red beret, as were the Hastings and Prince Edward Regiment. I know at least one Hasty P WW II vet who wears a red beret with his Legion kit - it is a reference to the Old Red Patch the 1st Div wore in WW II, and to whom the Hasty P‘s belonged.
When my dad was in the artillery he wore a midnight blue beret (he remembers it as being black, but I recently found out differently - the midnight blue appears to be a post WW II issue to many different corps, IIRC).
The green beret was worn by Commando troops in WW II.
With unification,the CF Green beret was adopted as universal headdress with the exceptions listed in this thread (Highlanders, Scottish, airborne, armoured) and the link to the commandos of old was gone.
The Green Berets worn by special forces in the States were a fairly new concept when the CF unified, and Vietnam-bound Green Berets often did so with CF berets on their head. I take it they were prized for their construction and high quality materials. (You laugh at the thought, eh?)
The red beret went to the meatheads; British Provost Corps troops have always worn red covers on their hats to identify themselves. Oddly, Canadian MPs in WW II refused to wear the red covers (with some exceptions in Canada) because the British "battle police" had earned such a nasty reputation in WW I - the Canadian MPs did not want to be associated with that, and chose to wear plain khaki berets from 1943-45 in NW Europe and Italy. Ironic that they now wear the red beret so proudly.
You have to be MP trained to qualify for the red beret incidentally; some MPs do wear the green beret and Thunderbird cap badge until they qualify in trade.