It's all in how you say it. Don't just go you have pretty hair. It might work but it might not. I exercise at a gym regularly in a group class called Body Pump. There are usually a lot of women there. One day a college age girl went there with her hair in a ponytail. Her hair was gorgeous. I was about twenty years older than her so I knew I would never get anywhere. She was on the other side of the room. After class she took her ponytail loose and began to put up her weights. I was putting uup mine also and said "Your hair looks exactly like Kate Middleton's hair. It's the same color, length, style. It's amazing." By comparing her to someone else who is well known, it was innocent enough. She was thrilled. She said that she thought Kate Middleton was one of the prettiest women she ever saw and thanked me for the compliment. The next time I went to the class, she set up right next to me. She's engaged and I'm married but we became very good friends. She asks me how her hair looks in this style or that, should she frost it etc. She actually asks my opinion. It's been a year now. She knows I like long hair and wears it loose and is letting it grow longer.
With your co-worker, you could simply say, I've seen you wear your hair in a lot of different styles. I think this one (whatever she happens to have that day) looks really nice on you. Or I like your hair ooose thata way, it really brings out the color of your eyes. Just keep the statement light and simple. Give her the chance to make the next move. It shouldn't creep her out. It's all in your mannerisms and how you say it sometimes moreso than what you say.