Reverting colored text back into default text

How do I revert colored text back into its default color? :

Whenever I am using the ANSI color codes (as recommended by the Replit Python Tutorial), I am able to perfectly execute it into the executor and it shows up with, for instance, a green text due to the use of:

"\033[032m This code displays green text \n".

However, the problem that I am confront with is that whenever I use code like aforementioned, when displaying some other code afterwards, it still shows up as green code.

Does anyone have any suggestions on how I can fix this?
Thank you in advance! :smiley:

Repl link:

print("\033[31m πŸ“’ Please read the directions and try again. πŸ“’")


print("Now that you know your ability, you can use it against Mr.Roombastic ONLY ONCE throughout the match to nullify him for a brief time.")
print("You can simply activate it by typing 'Y' or 'Yes' when the refferree asks if you want to use your ability before Mr. Roombastic's turn.")

All help is appreciated!

1 Like


In order to reset the colors back to its defaults, use \u001b[0m!




std::cout << β€œ\033[0m” << β€œtext”;

Image and I learned this from Bookie0’s post:

Please mark as the solution and like the post if it helped :+1: