colors.combine

From ComputerCraft Wiki
Revision as of 00:46, 12 July 2013 by Watcher7 (Talk | contribs) (Int -> {{type|number}})

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


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

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