If you can’t beat ’em — paint ’em yellow.

Uber drivers are transforming their black cars into taxis as part of a Taxi and Limousine Commission pilot project, The Post has learned.

So far, five hacks have gone through with the makeover, and seven more are in the pipeline, the TLC said.

“It’s a nice color. The yellow is good,” said Mohammed Molla, who converted his black 2015 Toyota Camry last week and began driving for Queens Medallion Leasing.

Molla said he worked for Uber for a few months earlier this year, but prefers to pick up street hails during rush hour and get a tip.

“There are too many problems driving Uber,” he said, adding that he also likes to use taxi stands in the city and the cab lots at airport terminals.

The program was approved in January, and accepts cars no older than two years, reversing a nearly 20-year-old TLC requirement that only new cars be added to the city’s taxi fleet.

Tweeps Phillips of the Committee for Taxi Safety said it helps drivers who had been locked “into car purchase agreements that made it next to impossible to do anything but drive for a living.”

It comes as Uber cars now outnumber yellow cabs, 14,088 to 13,587, according to TLC data released in March. Taxis still make more trips.

But Bhairavi Desai, of the New York Taxiworkers Alliance, said it’s Uber drivers who have been struggling since last summer, when the app slashed fares and made it difficult for drivers to survive on Uber as a full-time job.

“Too many people are competing on the street. They are undercutting and not earning enough of a living,” she said. “Thousands have been in that predicament.”

The program would make it easier for drivers to move, said TLC Commissioner Meera Joshi.

“If this pilot helps even a few drivers make a career decision that they otherwise wouldn’t have had the flexibility to make, then it will have been a success,” she said. “Good regulation should support driver choice among for-hire sectors, and remove pressure points whenever possible.”

Uber said over a hundred yellow-cab drivers join it every week and earn more money. The app gives more flexibility than garages that offer 12-hour shifts, the company said.