Create a Spannable object, set its text via SpannableString.
Spannable spanobj = new SpannableString("word to set color");
spanobj.setSpan(new ForegroundColorSpan(Color.WHATEVER), 0, 4, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
You can use this to set the text on your textview.setText(spanobj);
Cycle the 0, 4 (start index, end index) to say 5, 7 and update the view to color more of the string. 0,4 would set the color of 'word' 5,7 should set the color of to and so on...