This is a somewhat culturally specific question - as some cultures are more upfront and business like with their personal interactions, while others have a necessary 'beating around the bush' nature.
I'll give my perspective as a New Zealander, where we have more of a tendency to beat-around-the-bush.
As you point out - plenty of people meet their partners in their workplace, so I'm not one to suggest that as a blanket rule you shouldn't attempt romance with someone you work with.
The key concept is that you want to avoid making the other party feel unsafe, harassed, or coerced. That's the key thing you want to keep in mind when broaching this subject.
One reason that that a workplace interaction can feel coercive or like harassment is because the subject is in a sense, trapped in that scenario. There's the sense that they can't walk off a job to avoid someone's advances because they might lose their job, or that one has the professional responsibility to be polite and friendly to their coworkers.
So if you can interact with your colleague outside of a work context that can give you more freedom to be more direct with a colleague, because in that scenario they are no longer bound by an sense of obligation to be polite, or to stay in the scenario.
So a good way to initiate things is to ask if they want to have coffee outside of work. That can be just coffee at lunchtime, in a place that physically different to the work place. Or it could be a cup of tea after work. From there you could suggest hanging out outside of work.
At that point, they might realise that you're interested in them romantically, and if they don't reciprocate your feelings, at least more apparent that you haven't tried to use a coercive dynamic to make the date happen. Then they can politely turn you down, the whole thing is less awkward than if you had tried doing it in the office.
One key thing to look out for:
- When you are chatting with this colleague - are you connecting on a personal level, or are you talking about work? If they keep turning the conversation around to work then it might suggest that they're not they're only interested in interacting with you in a professional context. (Of course, they could just be an awkward person who only thinks to talk about work).