Women love compliments, women don't love shallow attempts to get our attention, don't worry, no man will escape the consequences of a wrong compliment.
A genuine compliment will always be specific to the person you're directing it towards. Generic efforts can be read as insincere or worse—somewhat manipulative.
Think about who she is on the inside, what personal qualities you admire most about her. Some of the best compliments revolve around humorous, kind qualities.
Pay attention to how she acts during your exchange. Is she avoiding eye contact? If so, she might not be super into what you're trying to get at.
How good are his jokes after a romantic dinner? How much do you like his dress at the party?
Also be mindful of what undertones you're communicating, especially if they could be considered suggestive or derogatory.