So, I was out walking today (let's be honest, I was playing Pokemon Go) at a local park. My hair was half up, exposing the purple layer underneath. I passed some men sitting at a picnic table and one, very enthusiastically, shouts at me, "Your hairdo is amazing! That looks so awesome!" His buds chime in and I can't help but laugh and thank them as I walk on.
That interaction? That's an example of how a man can genuinely compliment a woman that is a stranger to him without making her feel threatened and actually feel like, yes, she has been complimented.
So if you're a guy trying to get the attention of a woman you don't know by commenting on her appearance, that's the way to do it. Be genuine, don't make it sexual, and pick a feature that she makes active choices about, like my purple hair, which is obviously not lucky genetics.