Assuming to be what one is not; being a pretender or hypocrite. This arose from the days of piracy on the high seas, when a pirate vessel, sighting a possible prey, hoisted the flag of a friendly nation to its halyards to allay suspicion while it drew within striking distance, thus catching the unsuspecting victim unprepared for defense. But “under false colors” was in earlier use in a similar sense, denoting a man, sect, or even an army appearing in the garb or under the badge or insignia of a house or party of which he was not a member. From this were derived such phrases as “to come out in one’s true colors” and “to show one’s colors”; that is, to reveal one’s true nature or standing.
—Charles Earle Funk, from Heavens to Betsy! and Other Curious Sayings, 1955.