Ask Your Question
0

Printing in different colors in notebook

asked 12 years ago

G-Sage gravatar image

updated 12 years ago

That's it. Instead of

print "Hello world"

and getting the output in the standard blue (in the notebook), I want to have a different color sometime. Is this possible? Much love.

Preview: (hide)

Comments

1

Don't forget you can also use `%html` in the notebook for full styling, or maybe the `html()` command will be useful as well...

kcrisman gravatar imagekcrisman ( 12 years ago )

@john I'm mostly talking about that I want one line to print in red and the next to print in green and all that. I want that kind of control. It looks like the answer in that question tells you how to change the color for one cell, not for one line of printing.

G-Sage gravatar imageG-Sage ( 12 years ago )

@kcrisman Okay, thanks I will try that out.

G-Sage gravatar imageG-Sage ( 12 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 12 years ago

Jason Grout gravatar image

How about:

html("""<font color='red'>hi</font><br/>
<font color='blue'>bye</font>""")
Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 12 years ago

Seen: 1,624 times

Last updated: Dec 08 '12