How to change the ouput color in the terminal of Visual Code?

Viewed 5285

Im a Python programmer and I have swithced IDE. I have switched from Spyder to Visual Code. Untill now I can say that Visual Code is way better then Spyder, but I have some problems with the output color in the terminal.

This is my output in Spyder: enter image description here

This is my output in Visual Code: enter image description here

As you can see in Spyder the output is written in the White color, whilst the path is written in Green. In Visual code the whole output (path + output) is written in Blue. I prefer the color settings used in Spyder, because Im very color orientated. I think its very nice to distuinguish between Path and Output using different colors.

So my question is: How can I give the output and the Path a different color in Visual Code?

1 Answers

In VS Code, we can change the color of the internal terminal, but currently it is not supported to change the color of the terminal output separately.

You can refer to this link that I have submitted: Is it possible to set the color of the content output from the VS Code internal terminal?

However, I use the following two workarounds and you could refer to them:

  1. Use special code output:
    print("\033[31mThis is red font.\033[0m")
    print("\033[32mThis is green font.\033[0m")
    print("\033[33mThis is yellow font.\033[0m")
    print("\033[34mThis is blue font.\033[0m")
    print("\033[38mThis is the default font. \033[0m")  # More than 37 will display the default font.

enter image description here

  1. Use VS Code extension: For example: Code Runner

enter image description here

Related