In some shows, ethnicity is mentioned so little that we could almost say the characters didn't believe in the idea that every person on earth can be classified as being a member of one distinct racial group (e.g. Nordic, Germanic, Japanese), and that all the people in those groups always share inherent, unique, and unchanging characteristics of both appearance and character. I.e. racialism.
Then, out of the blue, someone will make maybe-racialist-supremacist or maybe-innocuous remark to the Token Minority. The audience blinks, even if no-one on the show does. It's often a good and memorable way for an audience to discover a character's belief in races, but more importantly it showcases the speaker as being blunt but well-meaning. They might well be an Innocent Bigot who sincerely has no idea that they are being offensive - assuming, of course, that the listener is the type to take offence.
Compare Positive Discrimination. May lead to Some of My Best Friends Are X, wince-inducing as the combination of the two usually is. Or even Boomerang Bigot, when the minority in question invokes this.
Black Lagoon has the old SS officer Albert complement Dutch with this after Dutch and Revy kill an entire shipload of neo-nazis who had failed him. He explains that although (the African-American) Dutch is an "inferior race" and that he sincerely hopes "his kind" will one day be exterminated, he's still quite impressed that they managed to defeat the entire crew and that he'd award Dutch an Iron Cross if he was white. Dutch retorts that he wouldn't have wanted it anyway and that he sincerely hopes the old cracker "rots in hell".
A darker variation occurs in One Piece when Arlong goes into one of his racist tirades against humans and Nami tells him she's already heard it. Arlong apologizes to her, saying he would make an exception for her since she can't help what species she is. He continuously praises her skills as a navigator and says she's the one human he values the most.
Later Arlong says to Luffy that while the rest of humanity are rats, Nami is a cat. Any rebellious behaviour from her would be seen as cute.
From Top 10: (the black) Det. Corbeau is stuck in a gladiator tournament on a parallel world where the Roman empire never ended and most "Nubians" are slaves. The announcer introduces him and his opponent, a robotic dinosaur, as: "John 'King Peacock' Corbeau of Precinct Ten, a credit to his race, and Delta 'Technozoic' 2401 of Precinct Seven, a credit to his manufacturers."
In ElfQuest, Picknose the troll at one point refers to Cutter's late father Bearclaw as "the only elf who was almost as smart as a troll". He actually means it as a backhanded compliment, but Cutter doesn't take it well.
In Preconceptions, a crippled vampire asks an amnesiac Xander to stake him. Xander promises to knock him out first so he won't feel it, causing said vampire tell him "for a blood bag you're all right."
Films — Live-Action
Underworld Rise Of The Lycans — 7 minutes in. "You are a credit to your race," said by Viktor to Lucian. Probably done deliberately to highlight Viktor's "racism" against werewolves.
Brilliantly paraphrased by someone as "Live long and prosper... and the horse you rode in on" or "Live long and suck it!" Many fans also translate it as "Live long and fuck you."
The main character of the World War II film A Soldiers Story is a black Army Captain (not to be confused with a Captain in armed anarchist groups during the Russian Revolution), which at the time was utterly unheard of, as the Army was still segregated at this point. He was sent to an base in Louisiana to investigate the murder of a black sergeant. The Colonel of the base clearly doesn't want him there, but has orders to comply and gives the captain this speech before he begins his investigation:
Colonel: Remember, you're the first colored officer most of these men ever seen. The Army expects you to set an example for the colored troops... and be a credit to your race.
Spoofed in the Woody Allen flick Scoop; Allen's character says those exact words to so many people he meets it's practically his Catch Phrase, never mind that all of those people are white, British aristocrats.
In Fear and Loathing in Las Vegas, Raoul Duke describes Doctor Gonzo, his lawyer/partner in crime as being very important to him "in spite of his racial handicap" while the man is sitting right next to him. Gonzo is tripping too many balls to care.
Boy Wonder has Detective Stenson pulls this on Ames.
In A Conspiracy of Paper, the protagonist is Jewish and one scene has him conversing with several intellectual friends, all of whom are presented as enlightened people. They are all of the opinion that Jews are basically Always Chaotic Evil and view the protagonist as one of the few exceptions.
Slughorn in Harry Potter seems to honestly realize that prejudice based on blood purity is wrong, but still seems surprised that Lily was so talented and naturally assumes that Tom Riddle is from some old, noble family, which was true on one side but not the other. He also seems to take this attitude with Hermione.
In Discworld book Jingo, this comes up a few times. For example, Sgt. Colon says that a fellow who runs a Klatchian takeaway is "not bad for a raghead." (This may be Pretend Prejudice, though, because Sgt. Colon eats there regularly anyway and while he believes absurd things about Klatchians he doesn't actually mistreat any.)
In Malevil, Emmanuel makes a comment concerning his foreign lover Birgitta. He "complements" her work ethic as "not being backwards" before stating Germans have no real sense of direction or motivation.
Done frequently in Hilari Bell's Trickster's Girl. The shapeshifter Raven has a very poor opinion of humans, but thinks well of Kelsa. Whenever he lets her know she's too offended by his opinion of humanity to care that she's being complimented.
Frodo: For I have become very fond of Strider. Well, fond is not the right word. I mean he is dear to me; though he is strange, and grim at timesf. In fact, he reminds me often of you. I didn't know that any of the Big People were like that. I thought, well, that they were just big, and rather stupid: kind and stupid like Butterbur; or stupid and wicked like Bill Ferny. But then we don't know much about Men in the Shire, except perhaps the Breelanders.
Gandalf: You don't know much even about them, if you think old Barliman is stupid...
In Animorphs, Andalites are very prejudiced against the disabled, or vecols, and expect them to live lives of quite isolation so as not to bring shame to their families. In one book, the main characters discover a famous Andalite Ace Pilot who was permanently crippled in his last mission and is hiding out on Earth. Ax makes bigoted remarks about him the whole book, and even gripes about having to rescue him, but in the end when they finally meet face to face he promises to "remember him as he was", or to pretend he died in battle instead of becoming a vecol. This is intended and taken as a great compliment.
During "Spin the Bottle", a fourth season episode of Angel, the principal characters botch a spell which causes their memories to revert to the age of about 15. As Angel himself was sired as a vampire in 18th century Ireland at age 26, his 15-year-old personality comes across with a rather biased world view, typified by this exchange spoken while Wesley and Gunn were grappling each other.
Cordelia: Aren't you going to stop them? Angel/Liam: It's about time the English got what was coming to them. I'm rooting for the slave.
Jerri Blank says exactly this to her friend Orlando in an episode of Strangers with Candy, where he is frequently one of the countless racial/ethnic/sexual/religious minorities she will offend in the course of the day (or would offend, if any character in the show were capable of being offended by anything):
Jerri: You're a credit to your race, simian.
Orlando: You're a good friend, Jerri. *pat*
Jerri: Don't touch me.
On WKRP in Cincinnati, Mr. Carlson almost called Venus a credit to his race, but caught himself and awkwardly changed it.
Papa Titus from Titus was created as being so far beyond being un-P.C. that his comments turn right around and could almost be considered compliments.
Ken Titus: What's the hurry? Your fifteen kids will still be waiting for you when you get home!
Also when Titus introduced Ken to his new black friend Roger who just moved to the neighborhood, Ken politely greets him, then adds, "This is the first time I ever saw a black man move a TV into a house."
Q, a Sufficiently Advanced Alien from Star Trek: The Next Generation, more or less feels this way about Picard. At every possible chance he gets Q makes fun of the inadequacies of the human race, but shows special interest in Picard whom he frequently tests to prove the worth of the human species. As Picard passes these tests Q praises Picard for his abilities and tells him that he above all other humans he has met proves the potential for greatness that humanity possesses. Beyond even that Q actually went so far as to say Picard is the closet thing he has to a friend in all the universe, above even his own race!
Also in Star Trek: Deep Space Nine episode "Favor the Bold", when Damar asks Quark to taste his kanar, to show that it isn't poisoned.
Quark: Poisoning customers is bad for business. Damar: True. But some people may place a brother's revenge above business. Quark: Not this Ferengi. [Quark makes to taste the kanar. Damar takes the glass from him.] Damar: You're a credit to your race, Quark. Unlike your brother, you've chosen to back the winning side.
Of course, in true Ferengi fashion, Quark is just liquoring Damar up (again) to pump him for information (again) to serve his own agenda, and playing the part so Damar won't suspect anything.
Deconstructed in That Mitchell and Webb Look. Jesus delivers the parable of the Good Samaritan, which his disciples find offensive as it implies that goodness in a Samaritan is uncommon enough to be worthy of notice.
Parodied in an episode of The Muppet Show. Statler and Waldorf are commenting on one of the guests, and one of them comments on the performer being a credit to their race. The other asks "What race is that?" and the reply is "The hundred-yard dash." Dohohos follow.
Subverted in Doctor Who, in the Jon Pertwee storyline "The Green Death". When the Doctor meets Dr. Clifford Jones, he mentions that he read one of Dr. Jones' papers, saying that it was "brilliant for his age". Subverted in that the Doctor didn't mean Dr. Jones' physical age, but the age in which he lived (early 1970s).
Neroon: You talk like a Minbari, Commander. Perhaps there was some small wisdom in letting your species survive.
In a later episode, he gives a similar speech regarding ranger Marcus Cole, saying that, at that point, the human had been "more Minbari than I".
In the American version of Being Human, Suren, a vampire, attempts to compliment Josh, a werewolf, on his housekeeping, and tells him that he's "a credit to his kind." Josh's girlfriend takes this as a Jewish slur. Aidan covers by saying she meant keeps clean house for a guy.
Chris Rock once illustrated the absurdity of such statements in a routine where he tracked the progress of African-Americans based on various individuals who were frequently cited as a credit or debit to his race (Martin Luther King Jr., Beyonce, etc.), as if it were a board game. When he got to Tiger Woods, the game piece advanced several squares, only for Rock to remark, "But we can only claim about a quarter of him!" and then moved several squares backwards.
In GURPS Alternate Earths, one of the alternate timelines is dominated by Muslims. In this world, "Muslim" is seen as a synonym for "civilized", and if a Muslim calls a Chinese or European "almost Muslim", we have this trope.
The Vasudan officer debriefing you in a mission from Freespace 2, when you're in an officer exchange program, compliments you this way. To be fair, the two races had fought a 14-year war since their first contact, which was ended (and turned into an alliance) to face the Shivans, and they've come a long way since then in a mere 32 years. Despite the lingering stereotyping, racism, etc, this case is more along the lines of a very high military award. Heck, many such awards in today's militaries are worded along the lines of "your actions reflect great honor upon your unit and were in keeping with the highest traditions of the Navy." However, there are a few other times in the game where this happens, but they're always genuinely well-meaning compliments. This is not quite the case in the first game.
If you fly with Vasudan wingmen, one of their battle comments is "Impressive, for a Terran."
In Deus Ex: Human Revolution, Brent Radford is quite possibly the most vocal anti-aug in the game, and will keep hurling insults at Jensen even if he tries to save his life. The closest thing to a compliment you can get out of him (and only if you go through the right dialog path) is when he claims Jensen has "a lot of heart...for a robot".
In Mass Effect 1, Garrus can tell Wrex that he's been raised to see the krogan as savage thugs, but Wrex has surprised him. "You are different." Wrex is about as impressed as Spock, and suggests Garrus go back to the ship, lest staying in the real world force him to actually learn something.
A similar conversation plays out between Kaidan and Wrex, where he comments that Wrex isn't anything like what he expected from a krogan. Wrex sarcastically replies "Sure, because humans have a wide variety of cultures and traditions, but all krogan think and act exactly alike." Kaidan apologizes, and Wrex accepts (in his own way).
Wrex is however an odd case. By his own admission nearly all Krogans are blood knights and have been reduced to little more than petty thugs and mercenaries, and while he himself can come off this way it is a fašade because that is what is expected of Krogans, and he shows deep regret at his inability to help his people because of the fundamental aspects of their species. He does enjoy fighting an awful lot though and tends to troll people a lot (especially Kaiden) through his deadpan sarcasm
Fallout: New Vegas. If you get the Boomers' respect, they start being impressed at how competent you are "for a savage" (i.e. a non-Boomer). Some of them even try to correct themselves from calling you "savage" and call you "outsider" instead.
Similarly, the Brotherhood of Steel can be quite (unintentionally) patronizing towards you as well, even if you have a high standing with them.
A female Courier gets the same treatment from Caesar's Legion if she decides to side with them, as they are staggeringly sexist yet have to pin all their hopes on a woman.
Minsc in Baldurs Gate 2 will openly praise Mazzy Fentan for being such a good warrior despite being so short. Subverted in that Mazzy realizes that Minsc isn't racist but just very earnest and used to saying things outright without social context. Minsc also apologizes once Boo points this trope out to him.
In The Legend of Zelda: Skyward Sword, Big Bad Demise has nothing but praise for Link when he raises his sword to him, recalling that the humans when he was sealed did little more than run and cower behind their Goddess. This extends to after you beat him, when his last words are shocked compliments towards Link for fighting with such power for a mortal. His habit of complimenting you makes him come across as less evil than his minion Ghirahim, even though he himself is the God of Evil.
In Dragon Age II, this is the Arishok's opinion of Hawke, if you earn his respect (in this case, Hawke doesn't represent humans so much as "everyone not of the Qun"). The Qunari even have a term for examples of this trope, "basalit-an", which means "outsider worthy of respect". Other materials have implied that Hawke, the Warden from the first game, and Alistair are the only humans to ever earn the title.
In The Elder Scrolls V: Skyrim, Athis, a Dunmer member of the Companions (a band of warriors who live by traditionally Nordic values) notes how Skjor, a senior member of the group told him that "even an elf can be born with a heart of a Nord". Athis dryly notes that the guy probably meant it as a compliment.
Interestingly, one of the books available in the game reveals that Skjor actually was quoting previous Companions: the same sentence was said about a previous Elven member of the Companions, who ended up becoming the first Elven Harbinger. Back then, this was the sign of a major improvement, as Nords are well-known to be rather xenophobic, especially against elves. Skjor was comparing Athis to a previous Harbinger, so he really meant it as a major compliment, but this ended up sounding a bit racist in the recent context.
The above Justice League quote. The Streak, a World War II superhero who is an Expy of the Golden Age Flash...and his attitude would probably be progressive for the era, as he's being completely sincere; John (who is black) is polite enough to take the condescending "compliment" in the spirit it was intended, although he does sound a mite frustrated at the same time.
Hey Arnold!, "Phoebe Cheats": It is suggested to Principal Wartz that he honor Phoebe, one of the few Asian characters in the show, since she just won a poetry contest.
Principal Wartz: We're proud of our multicultural students here at P.S. 118. Where do you come from, Phoebe?
Phoebe: Kentucky, sir.
In a bizarre response, he fails to realize Kentucky is a state, and pronounces it in an exaggerated "Asian" manner.
Principal Wartz: Well, Phoebe, let's make Ken-Tu-Kay proud on Thursday with a prize-winning poem.
Subverted in an episode of Teen Titans, when Noble Bigot guest hero Val-Yor turns out to be offensively racist towards Starfire's Tamaranian species. As expected, Starfire eventually saves his life, and Val-Yor learns his aesop... that Starfire is obviously one of the "good ones". Neither Starfire nor her friends are impressed, and Val-Yor takes this as a reason to disregard everything he had learned during the episode.
In The Venture Bros., original Team Venture member Col. Horace Gentleman, a decidedly "old-school" Adventurer Archaeologist, introduces the Venture brothers to teammate Kano, an Asian, and tells them "Despite his racial handicap, Kano here is a crackerjack pilot."
A humorous inversion from Futurama, when Fry thinks he's a robot and saves everyone.
Bender: You're a credit to my race!
In an episode of Extreme Ghostbusters, Garrett reunites with an old childhood friend who turns out to be the member of a racist gang that attacked a Jewish temple. Roland senses this from the beginning, but no one believes him, thinking he's being too sensitive. At the end of the episode, after the Ghostbusters captured the Monster of the Week, one of the gang members tells Roland: "I guess there's some use for 'you' people after all." Roland responds by almost punching him, but decides the racist isn't worth it.
In the memoir It's Hard not to Hate You, the narrator's elderly aunt has a habit of implying this. The implications grow more and more obvious until...
Aunt: Really, he's a credit to his...
Narrator [panicked]: Okay, stop right there!
Subverted by sports journalist, Jimmy Cannon, who wrote: "Joe Louis is a credit to his race—the human race."
In 1940, when Hattie McDaniel won the Academy Award for Best Supporting Actress for playing Mammy in Gone with the Wind, she stated in her acceptance speech that "I sincerely hope I shall always be a credit to my race and to the motion picture industry."
It Makes Sense in Context. This was back in the days when it was "appropriate" behavior for blacks (and to a lesser degree, whites) to consider themselves separate races.
When the film premiered, in still segregated Atlanta, Georgia, she was "ill" and unavailable to attend, or so the story goes. Had she shown up, she might have had to sit in the section reserved for Negroes.
Used completely sincerely by General George Patton when addressing a colored unit: "You guys are a credit to your race. You're here because I asked for the best. Now go out there and kick some Kraut ass."
Used by Adolf Hitler early in his life. His mother, to whom he was devoted, was dying of breast cancer when Hitler was still a teenager. Struggling financially, he begged her incidentally Jewish-Austrian doctor to help his mother, who then did most of the medical examinations and assistance for reduced prices or pro bono. Although his mother did die, he granted the doctor eternal gratitude, describing him as an Ehrenjude ("noble Jew"). It's a historiographically contested issue whether Hitler had already decided on exterminating the Jews at this point in his life, but by that time he had already been violently hostile towards them in general for several years. When the Nazis' persecution of the Austrian Jews began in 1938, he placed the doctor under SS protection and allowed him to emigrate from Germany after Bloch contacted him. This ability to allow for exceptions to his violent racism only serves to make him an even bigger bigot.
In addition, to honor the fact that Field Marshal Erhard Milch, who was a Jew, was one of his favorite minions, Hitler issued Milch a "German Blood Certificate," and had Nazi propaganda master Joseph Goebbles rewrite Milch's family tree, while stating "Wer Jude ist, bestimme ich" (I decide who is a Jew).
Hitler was also a fan of several Jewish performers. He would make a point of commenting that it was too bad they were not an Aryan every single time he attended one of their performances.
Ann Coulter once claimed that "To become a black Republican, you don't just roll into it. You're not going with the flow...and that's why we have very impressive blacks in the Republican party. (...) And that's why our blacks are so much better than their blacks".
Asian-American playwright Frank Chin coined the term "racist love" to describe this sort of attitude. According to this trope, a "good" minority is one that whites can control while a "bad" minority is one that they cannot.
A term in very much the same spirit is that of "model minority", imply that certain minorities are of greater worth compared to others and a "credit to minority races" as it were.
Back when Mexico and the Central American and South American Nations were still "The Vicerroyalty of New Spain" and "The Vicerroyalty of Peru" (All together being Spanish America or Hispanic America), the Spanish had a complex race-based hierarchy with 32 levels for varying racial mixes, which put pure Indigenous Americans and Black Africans at the bottom, pure Europeans at the top (Further distinguishing between those born in the Metropoli and those born in their American Colonies). However, it was possible to get a new certificate stating you were of a "higher" race if you performed some great service (Such as collaborating in the defeat of the Pre-Columbian American Empires) to the Spanish crown... or just gave them a large sum of money.
Played straight by William Lloyd Garrison, a white abolitionist who wrote the original introduction to Narrative of the Life of Frederick Douglass when it was published in 1845. He says that Douglass "need[ed] nothing but a comparatively small amount of cultivation to make him an ornament to society and a blessing to his race." The implication that Douglass needed the cultivation of white men in order to become a "blessing to his race" also makes this Fair for Its Day.
Infamously, a 1958 CIA document describes Che Guevara as "fairly intellectual for a Latino."