public static Color GetColorParam(IntPtr bar, String varName, String paramName)
{
var components = GetIntParam(bar, varName, paramName);
if (components.Length != 3) {
throw new ArgumentException("Parameter is not a color.");
}
for (var t = 0; t < 3; ++t) {
if ((components[t] < 0) || (components[t] > 255)) {
throw new ArgumentException("Parameter is not a color.");
}
}
return Color.FromArgb(components[0], components[1], components[2]);
}