Colour print command not working for me

The colour code dooesn’t work for me. When i put it in, i get an error or the whole text prints out in the same colour.
Please could you provide me with a solution.
Thanks!

1 Like

Can you please give your code?

3 Likes

The code was \033[0m

1 Like

We need the full code of your program.
Here’s a guide about how to share your code:

3 Likes

That’s because it’s not a color; that ANSI escape code is used to reset the text back to the default color, which is the opposite of what you want.

3 Likes

That ANSI code resets the console text. You can apply colors by using the format of
\033[_m
and replace the _ with numbers from 30-37. There are also other ways of getting colors from the console; see ANSI escape code.