Prior to WWII, there were 13 orders of dress for officers, ranging from the full dress cottee, to shirt and shorts, via a plethora of mess dresses, ball dress, and frock coats. However, during WWII, the majority were suspended (many never to be re-introduced); and as such, these are the only relevent officers uniforms:
Number 5: Double breasted, eight gilt buttoned blue/black doeskin jacket & trousers with a blue black cap with a white cap cover (white cap cover only worn with 5's in the winter in the Mediterranean during wartime, but worn in summer in the UK in peace). Black shoes without toecaps, white shirt and collar, and a black tie. This was, from 1939-1943, the only authorised uniform for officers in temperate climes, for best and for work wear. However, a dark blue shirt with attached collar was authorised in place of white for workwear
Number 5a: Blue/black serge "battledress" type blouse with serge lapels, exposed guilt RN buttons, and a button fastening on the waist (as opposed to the buckle fastening on Army Battledress), and blue/black serge trousers. Soft, rank shoulderboards were sewn onto the shoulders, and was worn with the peaked officers cap and either the white shirt and collar or the blue working shirt. Fleet Air Arm (or, more correct, Air Branch) Officers tended to wear the white shirt and starched white collars as they wished to distiguish themselves from the undisciplined RAF pilots.
It is worth noting that Battledress type uniforms were worn by naval officers from 1941, as a non-regulation uniform. These varied from dyed army battledress, to specially tailored items that resembled the later issued uniform. Usually they had buckle waist fastenings, a collar that resembled the army, but with exposed buttons and pleated pockets.
Number 5b: Introduced in 1944, and saw limited use in the war, this was similar to 5a's, except that the buttons on the blouse were fly fronted as opposed to exposed buttons. It was for use by the Air Branch pilots only, as they found the exposed buttons had a tendency to get caught on pieces of the cockpit and pulled off, leading to problems of Foreign Object Damage.
Number 10 : Single breasted fully buttoned white tunic with gilt buttons (similar to that worn by Class I & III ratings in number 5's) and rank displayed on stiff shoulderboards, white covered cap, and white leather shoes. This was the equivalent of number 5's in tropical waters, although was not really worn afloat.
Number 13: An informal tropical uniform; white shirt with rank displayed on shoulderboards, white shorts, white socks, white canvas shoes, cap with white top
Non regulation working dress; with FAA Irvin: