Drawing Text on the Canvas

The code I shared will handle that as well. Just replace the random color code with the color you need per text or word. When you say “selected texts”, what do you mean? A user can click on the word and specify their own color?