NEW YORK -- Dove has apologized for a controversial advertisement that critics have called racist.

The ad in question showed a black woman removing her brown shirt to reveal a white woman wearing a lighter colored shirt. It was eventually removed from the company's Facebook page.

The soap company posted the apology to Facebook and Twitter on Saturday, saying the ad "missed the mark in representing women of color thoughtfully." It added, "We deeply regret the offense it caused."

Social media users condemned the ad online, and CNN political commentator Keith Boykin shared a second, similar Dove ad that showed two women of color and a white woman standing in front of "before" and "after" signs. "Okay, Dove. One racist ad makes you suspect. Two racist ads makes you kinda guilty," Boykin wrote.

Critics said it was racist because it showed a black woman transforming into a white woman, suggesting that black skin is dirty and white skin is clean. Some noted the historical legacy of racism found in soap ads.

Fox Sports analyst Chris Broussard tweeted: I'll never use Dove soap again. #DonewithDove."

Dove, which is owned by British-Dutch company Unilever, has long had an ad campaign that highlights women's diversity, but they have criticized for missing the mark before. For example, a 2011 ad appeared to indicate a product could wash black skin white.