Difference between revisions of "Term.setTextColor"

From ComputerCraft Wiki
Jump to: navigation, search
Line 6: Line 6:
 
|api=term
 
|api=term
 
|addon=ComputerCraft
 
|addon=ComputerCraft
|desc=changes the color of your font (For common use add the decimal code of the color)
+
|desc=Changes the foreground color of text subsequently written to the screen.  For ease of use, it is best to use the color codes provided in the colors API.
 
|examples=
 
|examples=
 
{{Example
 
{{Example

Revision as of 09:29, 24 November 2012


Grid Redstone.png  Function term.setTextColor
Changes the foreground color of text subsequently written to the screen. For ease of use, it is best to use the color codes provided in the colors API.
Syntax term.setTextColor(color code)
Returns None
Part of ComputerCraft
API term

Examples

Grid paper.png  Example
Makes the words Hello World! green.
Code
term.setTextColor(colors.green)
print("Hello World!")