echo "${txtred}Text${txtrst}" color not always working

I have a .sh file through terminal and I'm using echo "${txtred}Text${txtrst}" as a display of what's happening when running the script. But sometimes the color is not red, although I used {txtred}. I don't know why? If anyone could advise why may be this is happening.

You can try using ANSI escape sequences
They look somewhat like this in a echo command
$ echo -e "\e[COLORmSample Text\e[0m"

You have to use the -e flag to use these, however. 
But with these you can change both foreground and background colors.
Have a look at this