private static MakeArgb ( byte alpha, byte red, byte green, byte blue ) : long | ||
alpha | byte | |
red | byte | |
green | byte | |
blue | byte | |
리턴 | long |
private static long MakeArgb(byte alpha, byte red, byte green, byte blue) =>
(long)unchecked((uint)(red << ARGBRedShift |
green << ARGBGreenShift |
blue << ARGBBlueShift |
alpha << ARGBAlphaShift)) & 0xffffffff;
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))); }