Difference between revisions of "Colors.combine"
From ComputerCraft Wiki
m (Int linking fix.) |
m (Int -> {{type|number}}) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=colors.combine | |name=colors.combine | ||
− | |args= | + | |args={{Type|number}} color1, {{Type|number}} color2, … |
− | |api= | + | |api=colors |
− | |returns= | + | |returns={{Type|number}} 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 |
Latest revision as of 00:46, 12 July 2013
Function colors.combine | |
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
Example | |
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 |