You can always use $+ or $+() to combine the color with the identifier or variable, as mentioned. However, if you have other text around the identifier or variable, you don't need to.
Example:
//echo -a 04,01 this 12is 06multiple 08colors 09with 11background 13color09 $nick
Notice that the 09 is attached to the word "color" instead of to "$nick". This has no effect on the output, so there's no need to use $+ or $+(). If "color" was an identifier or variable, you'd need to use $+ or $+(). The same is true for any control codes following $nick.