Bagatelle, the Meatpacking District bistro known for its brunches and beautiful people, had an ugly secret: It assigned special codes to customers with the wrong “look” or skin color, then banished them to cramped tables out of sight, a federal lawsuit claims.

When a minority walked in, staffers would scrawl “DNA” on bills or the reservation book — meaning “Do Not Accommodate,” court papers say. If diners were deemed ugly, they were branded with “BO.”

Shunned customers would be directed to Table 157 in the back, which staffers called the “Ghetto Station.” There they would often be forced to sit two to a chair, according to the suit’s photo exhibits.

Sometimes, reservations for unwanted patrons would simply get “lost,” according to the suit filed by two Bagatelle employees Monday in Manhattan federal court.

Ex-manager Laurent Nicoud “forced the plaintiffs and hosts of Bagatelle to use code words in order to cover up the repugnant and unlawful discrimination,” the suit says.

Plaintiff Renato Barreto, who is still a Bagatelle server, said the goal was to make the supposedly undesirable customers so “uncomfortable” that they would never return to the Little West 12th Street eatery.

“When you see African-Americans walking through the front door, we knew where they would sit,” Barreto, an employee since 2012, told The Post. “They would make them wait and wait and wait.”

Still, the French bistro opens its arms to black celebrities, filling gossip pages with items about Serena Williams, Jamie Foxx, Jay Z and Beyoncé dining on its $280 seafood tower or its king-crab ceviche.

Yet when four African-Americans without boldfaced names showed up last summer, Barreto recalled, they were led to a table with only three chairs.

“We do have the chairs,” Barreto said he told management. “This shouldn’t be happening here. Four people in three chairs? Really?”

He was allegedly told, “We don’t want them here anyway.”

An African-American Yelp user from Detroit also claimed shoddy treatment in an April review.

“The table for 12 . . . was set for 11 and was so cramped we said, ‘We’d pretty much eat in shifts,’ ” he wrote. “Not one time did the front come by and ask about anything. Not once.”

White patrons judged as unattractive would also be banished, Baretto said, recalling a woman from Sweden “with bad hair” who was sent to the “Ghetto Station.”

Barreto, 46, a native of Brazil who lives in Queens, said the discrimination wasn’t reserved for patrons. He said waiters of French descent were given preferential treatment — better hours and tables — over non-French servers.

The slighted servers, often relegated to the sidewalk cafe in the summer heat, were called “outside bitches,” court papers charge.

The suit alleges Barreto and the second plaintiff, ex-waiter David Kant, were subjected to “obscene behavior,” sexually harassed and mocked by the French workers.

“Bagatelle gave true meaning to the French word ‘bourgeoisie,’ where French servers were superior to the non-French peasants,” said their lawyer, Paul Liggieri. “Laurent Nicoud, much like the historical figure of Maximilien Robespierre, used his influence as manager to go on a reign of discrimination against patrons.”

The suit names Nicoud and several corporate entities. It seeks unspecified damages. Aymeric Clemente, a co-owner of Bagatelle with Remi Laba, declined to comment.