Is it morally OK for (taken) men to compliment women if they genuinely mean it and have no ulterior motive?

Suppose he is taken. His colleague in the office has a nice earring or dressed well for the an event. I'd not want anything from her, yet I imagine his SO (or girls in general) might be pissed if they knew.

Where do you think is the borderline?

Is it morally OK for (taken) men to compliment women if they genuinely mean it and have no ulterior motive?
Updates
1 y
Story: last time there was a meetup of my high-school. This female classmate of mine got some really special earrings, around as special looking as on the image. It is difficult "not to see it". When she complimented me for dressing up elegant, I could not help not praising her earring.
Is it morally OK for (taken) men to compliment women if they genuinely mean it and have no ulterior motive?
Post Opinion