In many military establishments (assuming Starfleet is military, since there is some debate about that). there's a bit of discretion with regard to such uniform choices, and especially when you are the Captain and the guy in charge on the ship.
Three historical examples of such things...
German U-'Boat Commanders in WW2 wore the unofficial uniform of a white peaked cap, which was invariably the 'summer tropical cap' cover of the normal Kriegsmarine, but became an unofficial perk they adopted to identify themselves as an elite.
Royal Flying Corps Officers in WW1 often wore their old army unit tunics as opposed to the RFC one, and when the RFC became the RAF, many continued to wear the Khaki RFC army tunics rather than the official new blue RAF uniform.
Manfred Von Richthofen (aka the Red Baron) is believed to have chosen red for the colour of his aircraft because it was the colour of his old Uhlan (reconnaissance cavalry) unit prior to him joining the flieger korp.