To come off with flying colors is to achieve great success. It is a military metaphor for leaving the battlefield still in possession of one’s flag. The phrase dates to the 17th century. From John Locke’s 1692 A Letter Concerning Toleration:
It may...bring a Man off with flying Colours.
And from George Farquhar’s 1706-07 A Beaux Stratagem:
We came off with flying colours.
Some claim a nautical origin for this phrase, but it appears to have got its start among armies, not navies.
(Source: Oxford English Dictionary, 2nd Edition)
Copyright 1997-2013, by David Wilton