private static MakeArgb ( byte alpha, byte red, byte green, byte blue ) : long | ||
alpha | byte | |
red | byte | |
green | byte | |
blue | byte | |
Результат | long |
public static Color FromArgb(int alpha, Color baseColor) { if (alpha < 0 || alpha > (int)byte.MaxValue) { throw new ArgumentOutOfRangeException(nameof(alpha)); } return(new Color(Color.MakeArgb((byte)alpha, baseColor.R, baseColor.G, baseColor.B))); }
public static Color FromArgb(int alpha, int red, int green, int blue) { if (alpha < 0 || alpha > (int)byte.MaxValue) { throw new ArgumentOutOfRangeException(nameof(alpha)); } if (red < 0 || red > (int)byte.MaxValue) { throw new ArgumentOutOfRangeException(nameof(red)); } if (green < 0 || green > (int)byte.MaxValue) { throw new ArgumentOutOfRangeException(nameof(green)); } if (blue < 0 || blue > (int)byte.MaxValue) { throw new ArgumentOutOfRangeException(nameof(blue)); } return(new Color(Color.MakeArgb((byte)alpha, (byte)red, (byte)green, (byte)blue))); }