Is there a way to change text color using script?

I have something to repeat, but I don't know how.