The Swiss player received orders from Wimbledon organisers on Wednesday to change the offending orange-soled shoes.
Wimbledon, the world's oldest tennis tournament, has the strictest dress code in the game, stating for the past 40 years that players must wear "predominantly" white.
The rules stipulate no solid mass of colour, no fluorescent colours, little or no dark and bold colours, and preferably all white shirts, shorts and skirts.
The tournament's clothing police allow no exceptions, even for top players like Federer, the seven-times champion ranked the world's eighth most powerful celebrity by Forbes magazine this week.
"He has been asked to change his shoes," said a Wimbledon spokesperson ahead of the Swiss player's match on Wednesday against Ukrainian Sergiy Stakhovsky on Centre Court.
He said several other players had also been asked to change their shoes to abide by the rules but no other warnings had been issued for other violations of the dress code.
The sight of coloured knickers being flashed as female players such as Maria Sharapova from Russia and American Serena Williams serve failed to make organisers see red. The coloured nails sported by a list of players on court have also not been ruled out.
Knickers have caused a stir at Wimbledon in the past, dating back to 1949 when American Gussie Moran was accused of "putting sin and vulgarity into tennis" by wearing lace-trimmed knickers at the All England Club in south London.
Six years ago, French player Tatiana Golovin shocked organisers by wearing a pair of crimson underpants beneath her white outfit which had officials reaching for the rule book, to no avail.
"The rules state that players can wear any colour underwear they like provided it is no longer than their shorts or skirt. Anything else must be white," said a Wimbledon spokesperson.
The all-white dress code is one of the traditions at Wimbledon, which dates back to 1877 when women wore ground-length dresses on the court, and officials are keen to uphold standards.
In 1985, the U.S. player Anne White was called to one side after arriving on court in an all-in-one, head-to-toe lycra bodysuit to play against Pam Shriver. She was asked to wear something more conventional and obliged but went on to lose her match.
This year second seed Victoria Azarenka and Czech player Eva Birnerova played in white leggings on the first day of the two-week championships although it was unclear if this was a fashion choice or to stay warm in chilly temperatures.
Second seed Azarenka had to pull out of the tournament through injury on Wednesday.
Naming and shaming
Logos are forbidden on any of Wimbledon's 19 courts, with Czech American player Martina Navratilova in 2004 famously taking scissors to her hat to cut out an offending logo.
However, British champion Andy Murray, who beat Benjamin Becker in his first round, was not hauled up for sporting the name of the Royal Marsden Cancer Charity on his sleeve.
The world No. 2 is hoping to win the tournament for his former doubles partner, Ross Hutchins, who is being treated for Hodgkin's Lymphoma at The Royal Marsden hospital and was in the royal box on opening day on Monday to watch Murray in action.
Despite the dress code limiting fashion flair on the court, some players try to add their own style with mixed success.
Sharapova, the world No. 3 who designs clothing for Nike, is closely watched by fashion followers and in 2008 turned up in a tuxedo-style top and shorts, much to her opponent's chagrin.
"It's very pleasant to beat Maria. Why? Well, I don't like her outfit. That was one of my motivations," said her compatriot Alla Kudryavtseva after beating Sharapova. – Reuters