[Python] Color in VS-Code Terminal doesn't work in Python

Discussão em 'Python' iniciado por Stack, Setembro 15, 2024.

  1. Stack

    Stack Membro Participativo

    I got this code:

    from colorama import Fore, Back, Style, init

    init(autoreset=True)

    print(Fore.WHITE + Back.GREEN + "This should be white text on green background")
    print(Fore.WHITE + Back.RED + "This should be white text on red background")


    But when I run it, it looks like in the picture - text on green background always stays black:

    [​IMG]

    And if I run it in cursor, both remain black

    [​IMG]

    I'm clueless how to fix it, can somebody help me? It works in normal terminal but I want to run in VS Code.

    I'm new to coding so I listened to ChatGPT, I changed VS Code settings, tried other code but now set it back to regular.

    Continue reading...

Compartilhe esta Página