/* RGB to HTML int color */
rgb2int(r=0, g=0, b=0)
{
local intcolor = 0;
if (argc == 1)
{
if (isarray(r) && numcols(r) == 3)
{
b = col(r, 3);
g = col(r, 2);
r = col(r, 1);
}
else
{
error(sprintf("%s - 3 column series required for single input", __FUNC__));
}
}
intcolor = ((r & 0xFF) << 16) + ((g & 0xFF) << 8) + (b & 0xFF);
if (isarray(intcolor))
{
setvunits(intcolor, "Composite RGB");
}
return(intcolor);
}