You can do this in Scrivener, which comes highly recommended for writers but has a steep learning curve, particularly because it compiles MSs in a variety of formats on completion, rather than formatting as you go along.
In Scrivener, you could colour the dialogue of each of your characters, select your entire project, go into Scrivenings view and do a Find By Formatting, Revision Colour.
This would show you every instance of one character's dialogue with each Find iteration.
Then, when the MS is finished and you come to compile, there's an option in Scrivener to remove all text colour. So, you can keep your draft with all your coloured dialogue, but output a Word or PDF or whatever without it.
A two or three-way conversation could get messy with
colours and become time consuming to set up.
I find it easier to make the decision at the start, figure out my
character's voice and stick to that as I'm writing. For example, I
have a character with a very distinct way of speaking and, whenever
I'm typing his dialogue, I hear it in my head in his accent. I also
read it out loud in his accent, when it's a long portion of dialogue,
to make sure it sounds right.