Mindy Kaling laughed off an awkward encounter with Stephen Colbert during her appearance on "The Late Show" Wednesday. 

The actress was on hand to discuss the second season of her Netflix comedy "Never Have I Ever." However, it was a moment that happened before she took the stage at the Ed Sullivan Theater that had the host blushing. 

"I’d also like to apologize for earlier," Colbert said, jokingly noting that he thought Kaling would bring up the moment herself because it would make him feel bad.

Kaling explained that she was backstage getting changed for the show and was only in a pair of pants and a bra when Colbert decided to pop into her dressing room to say hello and wish her luck.

MINDY KALING CELEBRATES 'VERY SPECIAL' BIRTHDAY WITH RARE PHOTO OF DAUGHTER KATHERINE

"I don't usually do this. I usually wait until the guests are in the wings," Colbert said. "But I thought I would just go, ‘hey have a great show.’ So I popped the door open. I knocked, but I did that knock and pop."

Mindy Kaling laughed off an awakward encounter with Stephen Colbert. 

Mindy Kaling laughed off an awakward encounter with Stephen Colbert.  (Scott Kowalchyk/CBS)

Despite the somewhat impolite incident, Kaling clearly has no hard feelings as she joked about wishing she had looked a little better if she was going to give the host an eye-full. 

"I just thought the whole time like, ‘I wish I had worn a sexier bra.’ Because it was like, you know, he works hard," Kaling said of the host, prompting a big laugh from him and the audience. 

'THE OFFICE' ALUM MINDY KALING CLAIMS SHE WAS 'DIVERSITY HIRE' FOR HIT SHOW: I WAS 'EMBARRASSED BY IT'

"That’s very thoughtful. So few guests take my feelings into account when I walk into them undressed," Colbert joked. 

The host went on to apologize and say that the moment was "entirely" his fault and encouraged people to always knock and wait for a response before entering a room. However, he commended the star’s entourage for instinctively protecting her from an unwanted guest. 

"They hurled themselves in front of you like I was an assassin," he joked. 

CLICK HERE TO SIGN UP FOR OUR ENTERTAINMENT NEWSLETTER

"I feel like Meghan Markle," she joked of the Duchess of Sussex. "They were like ‘you shall not pass!’ Like you had bad intentions. You’re still Stephen Colbert!"

CLICK HERE TO GET THE FOX NEWS APP

As Yahoo Entertainment notes, Colbert and Kaling worked together on a 2015 episode of her show "The Mindy Project." Due to their close relationship, she chose to use his show as a platform to announce the birth of her second child last year.