Ask them out someplace public outside of work. If they say no, that means no, and just drop it. If you hear "I don't know, I don't really like to date coworkers" that's also a no - don't push the issue. If they say "I don't think that's a good idea" - also a no. If they say "Eh....." or laugh or whatever, it's a no, and just drop it.
Be aware a no could make things really awkward for you two, and it may even piss off your co-worker who perhaps viewed you as this great work friend but now thinks things are weird. It can hurt them in other ways: they may also blame themselves for not being more into you, and question if they lead you on. So if you get rejected, just say "Hey that's cool. It was a long-shot, I understand."