echo is implementation dependant, i.e. what OS and shell you are using. Some accept the -e option, other don't. Check your man pages.
It might be better to use printf for those printouts as it is standardized across platforms and shells.
As has been said in these forums MANY times before; the behavior of echo , when invoked with any argument containing a backslash ( \ ) or when the first argument starts with a hyphen ( - ), varies from system to system and shell to shell. And, using terminal escape sequences to set text color varies from terminal (or terminal emulator) to terminal (or terminal emulator). Without knowing what the expansions of the variables in the arguments to your echo command expand to, what shell you're using, what operating system you're using, and how your environment has been initialized, it is hard to guess at what might be going wrong.
The portable way to write those escape sequences to a terminal (or terminal emulator) from a shell is to use printf instead of echo :
And, of course how your terminal or terminal emulator responds to those escape sequences can't be determined from the information you have provided. (But, on many terminals that recognize ANSI terminal escape sequences, it will produce red text).