private static string ToColor(int r, int g, int b, double percent)
{
if (Script.IsNullOrUndefined(percent)) percent = 1;
percent = Helper.NumberDouble.WithinBounds(percent, 0, 1);
return string.Format("rgba({0},{1},{2},{3})", r, g, b, percent);
}
#endregion