Questions about how to use programming tools are on-topic, so long as it's a practical, answerable problem that is unique to software development. Visual Studio Code is a tool primarily used for programming, and caring about how the ANSI color escape sequences are rendered seems to be something that pretty much only software developers would care about. The requirement also appears to be sufficiently narrowly scoped.
One issue with the question is the last sentence
Is there an extension that would let me do it?
This does look a lot like a request for recommendations, and that's off-topic. However, simply rephrasing it to ask how to do what is wanted would be fine. So I've edited the last sentence to say
How can I do this?
and cast a reopen vote.
Note that asking how to do something doesn't preclude answers that suggest extensions. Even if the question can't be solved by inbuilt settings, the question would be fine, since those settings may be added at a later date. The answers still need to be more than just links to extensions, but if they explain how the extension should be used, they are valid answers.
As another example, here's a fairly similar question Automatically hard wrap lines at column in VSCode that asks how to do something in VSCode. Note that the accepted answer suggests an extension, but that's perfectly fine, since it explains how to use it.