Often, you can tell who is in charge by the colours they wear. This can apply to royalty, nobility, military leaders, and even just the town mayor. Plus, this can apply to all of the clothes they wear or just a sash worn over a fancy suit (as long as they aren't the only one wearing it).
This largely started because certain colours were highly expensive and thus, only the most wealthy could afford them. Then the patrician class in Rome declared that the dye Tyrian Purple would be exclusively for them (at least, within Roman territory), hence the trope name. (Note that "purple" is actually kind of misleading as a translation; the actual colour was more what we'd describe as purplish-red. Don't expect to see this reflected in TV and movie depictions of Roman patricians unless they're being very, very scrupulous with their research.)
Other expensive dyes included royal blue, vermilion (a type of bright red), or gold. And that is why, in paintings of royalty, their Royal Robes are almost always these colours. Despite this, this does not have to be the Ermine Cape Effect; Modest Royalty can use these colours to ensure people know who they are.
Thus, in fiction, who is in charge, or closely related to those in charge, can often be indicated by wearing colours distinct from everyone else.
To fit this trope:
The people have to be in authority, but not necessarily royalty.
They have to wear these colours, not simply use something distinctly coloured.
Even though most common colours are purple, blue, red, and gold, any colour will do as long as those not in charge don't wear it.
The Kelloggs "Special K" breakfast food is aimed at women who want to stay healthy, regular and slim. The adverts tend to use groups of happy, shapely, unconstipated-looking women. Swimming costumes, post-bath towels or skimpy summer clothes feature a lot, just to make the point that Special K keeps you slim. Most of the women in the adverts wear white or neutral grey. But the Special K Girl, the star of the show, the one who typifies the brand to platonic perfection, the leader of the gang, the one the others follow - she, and only she, wears the corporate red.
The show also has a subtler instance of this trope: Murrue Ramius, The Captain of the Cool Starship, is the only OMNI officer of any rank we see who ever has red shoulders on her uniform instead of black.
More obvious in the Trinity Blood novels and manga: the Empress is the only one to wear green. Her personal guard wear red and the nobles wear blue.
On Gor, only Ubars (high-ranking warriors/leaders) may wear purple. Then, it's revealed that the Priest-Kings (the "gods" of the planet) have all of their slaves wear it as well.
Most of Sandy Mitchell's Warhammer 40,000 novel Scourge the Heretic is set on a world where only royalty wear red. An Inquisition operative raised on another world whose faith considered red a holy colour and always wore it compromised by buying red underwear.
In The Wind Singer, the citizens of Aramanth must wear a colour denoting their social status: grey (lowest), maroon, orange, crimson, or white (highest...until Kestrel and Bowman run into the Emperor, who wears blue).
In Jasper Fforde's Shades of Grey, the entire society is arranged according to what color a person can see - Purples form the highest class. Additionally, wealthy people can show their money and devotion to their color by wearing artificially colored clothes.
In David Eddings' Belgariad and Malloreon, only the Emperor is allowed to wear a gold toga in Tolnedra. The heir to the empire is allowed a gold border on his toga.
And in his Elenium, the patriarchs of the Church (basically, the story world's version of the Pope and his cardinals) all wear black at all times — except during state funerals, during which they dress in vibrant colors to indicate their homelands.
In the Deryni novels, Haldane rulers (Brion, Kelson, et.al.) wear red (unce Duke Alaric Morgan puts aside the black for other colours, he won't wear red because his king does). Prince Nigel Haldane, Duke of Carthmoor (Brion's brother and Kelson's uncle) wears royal blue.
In A Song of Ice and Fire, the fringe of the Ghiscari tokars signifies the importance of the wearer (with Tyrian Purple being the color of the Grand Masters).
In the Honorverse, only starship captains wear a white beret rather than the usual black.
In Poul Anderson's Time Patrol story "Ivory, and Apes, and Peacocks", none of the famous purple dye is visible for sale at Tyre. Everard reflects on how its expensiveness caused that, and led to this trope.
In Mercedes Lackey's Valdemar, Heralds wear white, Bards scarlet, and Healers green; trainees wear grey, russet, and light green respectively. In one novel it is explained that this is because those three colors are very hard to duplicate and therefore makes things more difficult for imposters.
In The Quest of the Unaligned, the people of the Kingdom of Caederan dress according to their social and magical status. Nobles (all of whom can use magic) wear white robes, with the color of the trim indicating which of the four elemental magics they use (red for fire, blue for water, silver for air, green for earth, and gold for the unaligned royal house). Peasant mages wear a robe of their elemental color with white trim and sash, while mundane peasants just wear brown.
In Diamond Sword, Wooden Sword, a fantasy sumptuary law dictates the color of your cape or cloak. A cloak or cape of a single non-white color means a high ranking mage of the Rainbow, who is a magocrat and automatically also an aristocrat. Two colors means royalty. Three - high nobility.
In the Firefly episode "Shindig", Sir Warrick Harrow wears a red sash, which denotes lordhood.
According to the Doctor Who story The Deadly Assassin, the majority of Gallifrey's political power is held by the Prydon Chapter, who are signified by their scarlet and orange ceremonial robes, while all the other chapters wear various other colours. This distinction seemed to be lost when the new series brought them back, although Word of God was that it was supposed to be unity during the time war.
In Babylon 5, The Emperor of the Centauri Republic wears all-white. All other Centauri wear various different colours.
Grey's Anatomy: The senior surgeons, the chief and the attendings, wear dark royal blue scrubs. The interns and residents beneath them wear light blue scrubs.
In Star Trek, Starfleet officers wear gold, blue or red depending if they are Command, Science, or Support Services (gold & red reversed in TNG & subsequent.) It is a little inconsistent, but Medicine & Biosciences seem to wear light blue, Social & Behavioral Sciences a medium blue, and Physical Sciences a very dark blue.
Trolls in Homestuck have a Fantastic Caste System in which the color of one's blood determines one's social status. Most trolls incorporate their caste's color and an associated symbol into their clothing.
Gran Gran wears purple as well. Of course, she was originally from the Northern tribe before she ran away due to her engagement, so maybe she was somebody important up there too. In the present, her son is the chief, and while him and all the other men were away at war, Kanna herself was the de facto leader of their village.
Katara, Kanna's granddaughter is another example, though not played quite as straight; she started out wearing a blue coat just accented with purple, but even so, she and Kanna were the only women in their village to wear any kind of purple. Naturally, for Katara, it's because she's the chief's daughter, much like is the case with Princess Yue. Her status as the only Waterbender the South Pole has may be part of it as well.
In "The Fortuneteller", Aunt Wu, the de facto ruler of her village, is the only one to wear a gold robe. All other residents wear shades of green, blue, or pink.
Mai, a Fire Nation aristocrat, also wears (dark) purple, possibly to foreshadow a future as Queen of the Fire Nation.
Papa Smurf wears red, where everybody else wears white. Grandpa Smurf - who is no longer a leader, but used to be one, and is considered a great adviser - wears yellow.
Red was apparently associated with royalty in Ancient Rome (the army too, but also royalty). It seems that when Julius Caesar started wearing red (specifically red boots—an old royal symbol), the Senate didn't appreciate the Foreshadowing (remember, Rome did not like kings) and plotted against him. And later, under the emperors, purple was the imperial color. Suspicious emperors would have people executed for owning purple robes. Depending on the period, the use of purple decorations (say, a border on a toga) was strictly regulated.
The white toga with the purple border actually has a name: it's the toga praetexta, and was traditionally worn by senators. So, it kind of made sense that they would regulate its usage; letting anyone wear them would be like letting anyone buy a school uniform: it would defeat the purpose. Those running for election would wear the toga candida, a toga that has be bleached to a dazzling white with chalk.
In fact, the toga itself was a status symbol as only Roman citizens can wear it.
Red was explicitly associated with the military, and a Roman general was expected to "put off the scarlet" (that is, change out of his military garb and re-don his toga) before he re-entered Rome. For Gaius Julius to keep wearing his scarlet cloak in Rome had a similar effect on the political class to that which you might expect if a sucessful modern general joined a government and persisted in wearing uniform in the House.
The colour called Tyrian purple actually looks more like maroon than your typical violet; the finest-grade dye was often described as 'dried blood'. It came from the mucus of a certain kind of Mediterranean seashell, the Murex, and required so many of them to make even the smallest amount of dye that it was worth twice its weight in silver. Expensive stuff, due its high cost there were legal limits on the amount anyone could wear at one point to prevent lavish waste. Cheaper purples were possible, by overdying a blue with a red, but they tended to be muddy and not very colorfast.
When the artificial purple dye mauvine was invented in the nineteenth century, it was sometimes marketed as 'Tyrian purple' and soon became associated with political radical movements such as suffragism—the implication being "if everyone can wear purple, then everyone is a king, therefore everyone is equal".
The dye from the murex, interestingly enough, turns blue when exposed to sunlight before being fixed to the cloth. This is why this is considered likely to be the source of tekhelet, the dye Jews are commanded to use to color few threads in the tzitzit (fringe-tassels) of their tallit (prayer shawls). Today there is much argument about whether the sun-treated murex dye is proper for use in tzitzit; the original dye is long-Lost Technology, and for some Jews absolute certainty is vital in such matters.
There were also rules about jewelry: for example, the Ius Annuli restricted the wearing of gold rings to the Patrician class, silver to the Equites, and various lesser metals to the Plebs. (The extremely vain ex-slave Trimalchio, in Satyricon, is just keeping within the law by wearing a gold ring with iron studs.)
A clear, bright, non-fading red was also rare, as it required either kermes or cochineal, once the Americas were discovered. Both of these are insects, and the dye is derived from their bodies. Given equal amounts of kermes and cochineal dye, the cochineal would dye 10 to 12 times more fabric. There were cheap red dyes, made from various plants (lichens and madder), but the colors these dyes produced tend to the orangey-red rather than a clear, bright crimson.
Surprisingly, to most modern people, a true black was an incredibly difficult and expensive color. There is no natural dye that produces a true black; the best way to achieve it was to overdye "black" wool (which is usually a really dark brown) several times, and it still resulted in a fugitive color, fading to brown or greyish-blue quite quickly.
Even today, people still need to take care of their black clothes to make sure they don't fade.
In China, yellow was associated with the Emperor because the first syllable of the traditional title huangdi sounds identical to the word for yellow. In historical dramas, this usually manifests in the Emperor wearing yellow clothing or awarding it for some service. The various grades of officials were also distinguished by color; blue, green, red, and purple.
Saffron, that super-expensive and delicious spice, also doubled as one of the finest yellow dyes.
In early modern England, sumptuary laws dictated which classes could wear which colors and materials (for instance, in order to wear velvet, you had to be at least a knight; silk was reserved for barons and above, and only members of the royal family could wear purple). When William Shakespeare's company became the King's Men under the reign of James I, they were allowed to wear scarlet, which was a Big Deal, even if the sumptuary laws were frequently ignored.
Traditionally, the Vatican has had a strict dress code about people who met with the pope—among the rules was that women always had to wear black, except for female Catholic monarchs and the wives of male Catholic monarchs, who could wear white (a rule called privilège du blanc). Following this code is no longer obligatory, though Cherie Blair (wife of former UK Prime Minister Tony Blair, noted for both being a Catholic and leftist with republican, anti-monarchy tendencies) caused some controversy when she chose to wear white (both as a possible violation of protocol—though she was Catholic, Tony wasn't yet—and a slap in the face to the Queen—as Tony wasn't head of state but rather head of government).
Adolf Hitler. Although most photos are in black and white, colour ones show he normally wore a plain light brown uniform before World War II. After the war broke out, he wore black trousers and a grey tunic with no rank badges. Hitler also normally only wore his Iron Cross and Wound Badge he earned in World War I along with his Nazi Party Pin (in gold), while everyone around him wore multiple metals.
Chinese Emperors were the only people permitted to wear all-yellow clothes in China. The colour association, and the implications of wearing yellow were so strong, that Emperors were frequently referred to as "the Yellow one" and wearing it was to imply imperial power. Occasionally he would allow close family members to wear something yellow - if you weren't given this dispensation, you could shortly expect exile or death.