Difference between revisions of "Colors.combine"
From ComputerCraft Wiki
(Make description match API table, use type template) |
m (Int -> {{type|number}}) |
||
| Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=colors.combine | |name=colors.combine | ||
| − | |args={{Type| | + | |args={{Type|number}} color1, {{Type|number}} color2, … |
|api=colors | |api=colors | ||
| − | |returns={{Type| | + | |returns={{Type|number}} the union of sets <var>color1</var>, <var>color2</var>, … |
|addon=ComputerCraft | |addon=ComputerCraft | ||
|desc=Combines a set of colors (or sets of colors) into a larger set. | |desc=Combines a set of colors (or sets of colors) into a larger set. | ||
Latest revision as of 00:46, 12 July 2013
| Combines a set of colors (or sets of colors) into a larger set. | |
| Syntax | colors.combine(number color1, number color2, …) |
| Returns | number 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 |