Difference between revisions of "Colors.combine"
From ComputerCraft Wiki
m (Moved to CAT:APIFunctions) |
m (Int linking fix.) |
||
| Line 4: | Line 4: | ||
|args=[[int (type)|int]] color1, [[int (type)|int]] color2, … | |args=[[int (type)|int]] color1, [[int (type)|int]] color2, … | ||
|api=color | |api=color | ||
| − | |returns=[[int]] the union of sets <var>color1</var>, <var>color2</var>, … | + | |returns=[[int (type)|int]] the union of sets <var>color1</var>, <var>color2</var>, … |
|addon=ComputerCraft | |addon=ComputerCraft | ||
|desc=Computes the union of sets of colors; each parameter may be a single color or may be a set of colors | |desc=Computes the union of sets of colors; each parameter may be a single color or may be a set of colors | ||
Revision as of 18:36, 30 November 2012
| Computes the union of sets of colors; each parameter may be a single color or may be a set of colors | |
| Syntax | colors.combine(int color1, int color2, …) |
| Returns | int the union of sets color1, color2, … |
| Part of | ComputerCraft |
| API | color |
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 |