Is it not the case, however, that the Mary and Elizabeth were grey after the war because they had been painted thus during the war for their troopship duties in order to make them less visible through the periscope of a U Boat? QE2, on the other hand, was repainted for purely image driven reasons.
How long after the war was it before they were repainted with black hulls?
Yes, Peter. The grey scheme had been part of their wartime camouflage. Battleship Grey had been adopted by the Royal Navy in 1903 at the start of the Dreadnought age and the height of the Anglo German naval arms race (
Riddle of the Sands and all that). The Imperial German Navy had introduced a "shades of grey" scheme in 1896 and the RN had noticed that it's own ships, with liner like black hulls, white upperworks, buff funnels and lots of shiny brightwork, whilst very smart and good for "showing the flag" might make any fight a bit of a one sided affair.
In the First World War another scheme had been tried. The dazzle ship, with random colours and shapes painted on their sides', designed to confuse the plotting of periscope depth U Boats. The Mauretania had a spell so painted. (Interestingly the NCL seem to be trying to bring something like it back

)
As far as a return to Cunard colours at the end of WW2, from what I can ascertain, the funnels were painted fairly soon after hostilities ceased. The hull and superstructure schemes were left until the ships were released from TUFT service and refitted for commercial operation.
The Elizabeth was first, released 6 March 46, refitted and back in service 16 Oct 46
The Mauretania " 2 Sept 46 " 26 apr 47
The Mary " 27 Sept 46 " 31 Jul 47
The Aquitania " 1 Apr 48, chartered to the Canadian Gov till 1 Dec 49 then retired Jan 50.