WARNING: Cannot be used at the same time as the gesture/proximity module
Properties
Name
Data Type
Range
Color
Color
0 - 255 for r, g, b
Hex
String
color hex value
Alpha [Raw]
int
0 - 5000
Red [Raw]
int
0 - 5000
Green [Raw]
int
0 - 5000
Blue [Raw]
int
0 - 5000
What does the data mean?
Measures the reflected color of an object. Shiny surfaces work best. The color property maps the values to a usable hex code. The other properties are the raw amount of reflected light for each color channel.
What ports can I use it on?
3-6
Code
var measuredColor = Magic.modules.color.color;
var redStrength = Magic.modules.color.raw.red;
using Magic;
public class Demo : MonoBehaviour
{
// create a reference to the module
public Magic.Modules.ColorModule color;
void Start()
{
}
void Update()
{
// access the property of the module
Color measuredColor = color.color;
}
}