The 30-year-old actress posted the picture on Instagram after announcing in June she's expecting a daughter with the 31-year-old singer.
The picture shows Duff wearing a black bikini and a red, white and blue lei as she gives Koma a kiss. Fans left well-wishes for the couple and their unborn child in the comments.
"Red, white, blue... and a splash of pink! Congrats on the baby girl!" one person wrote.
"So incredibly happy for you @hilaryduff love love love ya," another added.
Duff is already parent to 6-year-old son Luca Cruz with her ex-husband, retired NHL player Mike Comrie. She shared her son's idea for a baby name in an interview with The Late Late Show with James Corden in June.
"Luca thinks Cofont Croissant is, like, the coolest name," the star said.
"When I just refer to it as 'Cofont,' and I'm like, 'That would be so cool, nobody at school's gonna be named Cofont,' and he's like, 'Croissant. Cofont Croissant.' It, like, goes together. There's no separating the two," she added.
Duff plays Kelsey Peters on the TV Land series Younger, which returned for a fifth season in June.