Open.Core.Color.ToColor C# (CSharp) Method

ToColor() private static method

private static ToColor ( int r, int g, int b, double percent ) : string
r int
g int
b int
percent double
return string
        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