Added escaping around color codes while building prompt to prevent wrapping problems.