Unify color generation for bash and zsh

- use escape codes for non-printable chars  based on ZSH_VERSION