Well, thing is that I do not know in advance which word in the sentence should be in red, which in blue. The color is calculated by a special formula. It might be necessary to have something like this:
The quick brown fox jumps over the lazy dog.
So my question is basically whether it is possible to apply some sort of color control codes to be placed in front of different words. Tried HTML codes - this does not work. Maybe anybody tried to achieve this with svg, d3 or other sophisticated stuff?