Donate SIGN UP

Python Computing

Avatar Image
TheMacDonaldMan | 21:48 Fri 12th Jun 2015 | Technology
6 Answers
I'm on Brython using version 3.1.3 of Python. What would I type to get a bit of printed text to be any other colour than white? I currently have: print("Please enter your name"). For example how would I get that to be red?
Gravatar

Answers

1 to 6 of 6rss feed

Best Answer

No best answer has yet been selected by TheMacDonaldMan. Once a best answer has been selected, it will be shown here.

For more on marking an answer as the "Best Answer", please visit our FAQ.
I apologise that this doesn't directly answer your question but I hope that it might help anyway:

If you don't get an answer here you might like to join this dedicated Python forum, where it seems that most questions asked get responses fairly quickly:
http://www.reddit.com/r/learnpython
-- answer removed --
//Brython is designed to replace Javascript as the scripting language for the Web. As such, it is a Python 3 implementation (you can take it for a test drive through a web console), adapted to the HTML5 environment, that is to say with an interface to the DOM objects and events//


http://www.brython.info/
-- answer removed --
-- answer removed --

If you want to change the color of printed text in Brython using version 3.1.3 of Python, you would typically use HTML/CSS styling within the print statement. Here's how you can print "Please enter your name" in red:
print('<span style="color: red;">Please enter your name</span>')
This code snippet utilizes inline CSS styling to change the color of the text to red.

1 to 6 of 6rss feed

Do you know the answer?

Python Computing

Answer Question >>

Related Questions

Sorry, we can't find any related questions. Try using the search bar at the top of the page to search for some keywords, or choose a topic and submit your own question.