Colours of code

my python code does not change colour, is there anything I am meant to do for it to do so?

Hey @Faridahadedoyin welcome to the forums!

Can you please provide a link to the repl? This way it is easier for staff and members of the community to help you!

Also see this guide on how to share your code:

You could import termcolor and use colored(“text”, “color”). Or you could use ANSII escape codes. Both of these are great options to change the color of text. I personally like to use ANSII escape codes with f-strings so it’s not cluttered. I hope this helps!
I probably missed a few, feel free to add them in, it’s a wiki.

@Faridahadedoyin on further inspection is this a school assignment? If so, it is against Replit Ask policy for community members to request or post complete answers to homework-like questions. On the other hand, the community can assist you in working through and understanding the core fundamentals of computer programming to help you figure out your question by yourself, though.

ohh you’re probably talking about syntax highlighting. you’ll want to change the filename from

boring stuff


or anything you want, really. just remember to add .py at the end, and when you code, you’ll start getting the colors/syntax highlighting @Faridahadedoyin


In that file I don’t see anything that would print color, the most I see is return ‘’.

noo I don’t think you understand he doesn’t want colors in the py output, he wants it in the ide

1 Like

My bad, whoops!

@Faridahadedoyin by the way I notice your code is in a file that isn’t a file, if you are wondering and if needed you could move that code to or you can change the .replit file: first click on the three dots next to Files click Show Hidden Files, click on the .replit file. Go to entrypoint = or run = and change the file name to the one you want ran.


Yeh it works now thanks for the help!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.