Ask coding questions

← Back to all posts
Could somebody tell me how to add colors to this repl?
GhostKingNico (10)

I'm trying to make the text green but I am not sure how to???? How do I make the colors random?


Here is more information over how to use colors:


To make green color use:


InvisibleOne (2934)
PURPLE = '\033[95m'
CYAN = '\033[95m'
DARKCYAN = '\033[36m'
BLUE = '\033[94m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
ITALIC = '\033[3m'
FAINT =  '\033[2m'
NORMAL = '\033[22m’

Just put that into your repl, and then you can print stuff like:

print(GREEN + "This will be green text!")
print(BLUE + "This will be blue text!")
print(RED + "This will be red text!")