The creator of "Modern Family" has fired off a barbed tweet about gay marriage at Ann Romney, after the wife of the Republican White House hopeful said it was her favorite TV show.

Romney named the show -- which features a high-profile gay couple, Mitch and Cam -- as her top television pick in an interview on the eve of her speech at the Republican National Convention in Tampa, Florida.

Her husband Mitt, who was formally chosen as the Republican candidate for November elections on Tuesday, is against legalizing gay marriage, in contrast to President Barack Obama.

Steve Levitan, creator of "Modern Family," tweeted his double-edged response after Ann Romney gave her thumbs-up for his show in comments aired Monday.

"Thrilled Ann Romney says ModFam is her favorite show. We'll offer her the role of officiant at Mitch & Cam's wedding. As soon as it's legal," he said.

Ann Romney's speech at the Tampa convention was widely praised as an attempt to soften the image of her husband, who is due to address the Republican gathering at its climax on Thursday.