Difference between revisions of "Colors.combine"
From ComputerCraft Wiki
m (Fix wrong API name) |
(Make description match API table, use type template) |
||
| Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=colors.combine | |name=colors.combine | ||
| − | |args= | + | |args={{Type|int}} color1, {{Type|int}} color2, … |
|api=colors | |api=colors | ||
| − | |returns= | + | |returns={{Type|int}} the union of sets <var>color1</var>, <var>color2</var>, … |
|addon=ComputerCraft | |addon=ComputerCraft | ||
| − | |desc= | + | |desc=Combines a set of colors (or sets of colors) into a larger set. |
|examples= | |examples= | ||
{{Example | {{Example | ||
Revision as of 14:23, 22 April 2013
| Combines a set of colors (or sets of colors) into a larger set. | |
| Syntax | colors.combine(int color1, int color2, …) |
| Returns | int the union of sets color1, color2, … |
| Part of | ComputerCraft |
| API | colors |
Examples
| Combine white, magenta, and light blue to yield 13 (the bitwise combination of the colors) | |
| Code |
print(colors.combine(colors.white, colors.magenta, colours.lightBlue)) |
| Output | 13 |