This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Grav's profile picture

[Question] How would I use colors for this game I'm creating?

Started by Grav, 12 November 2012 - 05:34 AM
Grav #1
Posted 12 November 2012 - 06:34 AM
I've been looking around the entire wiki, and asked a few others who have worked with CC how to do this, but no-one knew how to. I really would like to use colors in this game to show what's good and what's bad. Thanks in advance!
Lyqyd #2
Posted 12 November 2012 - 06:44 AM
If you're in ComputerCraft 1.45 or 1.46, you can use the term.setTextColor and term.setBackgroundColor methods. You can find documentation on them in the wiki.
Espen #3
Posted 12 November 2012 - 06:46 AM
You can only use colors on advanced computers (the golden ones).
There, you can use term.setTextColor() and term.setBackgroundColor() to set colors.
To make your program find out if it is being run on a computer that supports colors, use term.isColor()

Edit: Ninja'd by Lyqyd, again.^^
Edited on 12 November 2012 - 05:47 AM
Grav #4
Posted 12 November 2012 - 06:46 AM
If you're in ComputerCraft 1.45 or 1.46, you can use the term.setTextColor and term.setBackgroundColor methods. You can find documentation on them in the wiki.

Ah, thanks!