An apology has been sent out by the team behind How I Met Your Mother, sorry for the offence that last night's episode 'Slapsgiving 3: Slappointment in Slapmarra' caused. The episode, which was partly set in China, was accused of being racist by some fans who used the Twitter hashtag "#HowIMetYourRacism" to criticise a scene in which the cast were shown with make-up, costumes and accents that some deemed offensive.

How I Met Your Mother Cast
The 'HIMYM' Team Disappointed Many Of Their Fans With Themes Of Racial Appropriation.

The episode sees Jason Segel's character Marshall travel to China, where he met characters from Kung Fu films which were played by regular cast members Jash Radnor, Alyson Hannigan and Cobie Smulders. The three were accused of using "yellowface," which is the practice of wearing yellow face paint to make oneself seem more East Asian.

18 Million Rising, an organisation which seeks to ameliorate the portrayal of Asian Americans in the media described the scenes as "disgusting," saying "How I Met Your Mother last night was transformed into#HowIMetYourRacism, with this charming yellowface theme," via Facebook.

Carter Bays, one of the show's writers, tweeted out an apology in defence of the storyline: "With Monday's episode, we set out to make a silly and unabashedly immature homage to Kung Fu movies, a genre we've always loved," he wrote.

Neil Patrick Harris Alyson Hannigan Jason Segel
The Show's Writers Have Apologised For Offending People.

"But along the way we offended people. We're deeply sorry, and we're grateful to everyone who spoke up to make us aware of it," the writer added.

"We try to make a show that's universal, that anyone can watch and enjoy. We fell short of that this week, and feel terrible about it. "To everyone we offended, I hope we can regain your friendship, and end this series on a note of goodwill. Thanks."

Cobie Smulders Jason Segel Josh Radnor
The Lines Between Funny & Offensive Were Dangerously Blurred: Let's Hope It Doesn't Happen Again.