WT-7834 was a big improvement, but there are still some situations where the build output is inappropriately colourised.
The problem appears to be that Ninja runs GCC (or Clang) while doing some form of stdout redirection, so the usual check of "stdout is a tty" will always fail, and the compiler's "automatic colour" mode will never colourise output.
So WT-7834's fix is appropriate until you need to copy/paste raw text from evergreen, when you get a bunch of ANSI escapes in the copied text.
I think this can be worked around by checking whether stdout is a tty as part of our CMake configuration, and setting the colourisation flags there.