Add a utility function to resolve TTY color escape codes dynamically