colors.combine

From ComputerCraft Wiki
Revision as of 18:30, 28 November 2012 by AfterLifeLochie (Talk | contribs) (Moved to CAT:APIFunctions)

Jump to: navigation, search


Grid Redstone.png  Function colors.combine
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

Grid paper.png  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