Difference between revisions of "Term.isColor"
From ComputerCraft Wiki
(Created page with "{{lowercase}} {{Function |name=term.isColor |returns=If the computer can display colors. |api=term |addon=ComputerCraft |desc=Returns if the computer can display colors. |exam...") |
(Fix example) |
||
Line 8: | Line 8: | ||
|examples= | |examples= | ||
{{Example | {{Example | ||
− | |desc=This program verify if the computer can display colors. <br />If it can,the computer set the background lime, | + | |desc=This program verify if the computer can display colors. <br />If it can, the computer set the background lime, otherwise, it shutdowns the computer. |
− | |code=local advanced = term.isColor() <br /> | + | |code=local advanced = term.isColor() <br />if advanced == true then <br />term.setBackgroundColor(colors.lime)<br />else<br />os.shutdown()<br />end |
}} | }} | ||
}} | }} |
Revision as of 07:56, 11 November 2012
Function term.isColor | |
Returns if the computer can display colors. | |
Syntax | term.isColor() |
Returns | If the computer can display colors. |
Part of | ComputerCraft |
API | term |
Examples