public Boolean GetColor (byte index, out byte r, out byte g, out byte b)
{
if (OnReceiveColor(index, out r, out g, out b))
return true;
if (index == 0)
{
return this.GetColor(out r, out g, out b);
}
byte[] colors;
this.GetColors(out colors);
if (colors.Length >= (index + 1) * 3)
{
r = colors[index * 3 + 1];
g = colors[index * 3];
b = colors[index * 3 + 2];
return true;
}
else
{
r = 0;
g = 0;
b = 0;
return false;
}
}
#endregion