public static ColorBgra FromBgra(byte b, byte g, byte r, byte a) { ColorBgra color = new ColorBgra(); color.Bgra = BgraToUInt32(b, g, r, a); return color; }
/// <summary> /// Gets the equivalent GDI+ PixelFormat. /// </summary> /// <remarks> /// This property always returns PixelFormat.Format32bppArgb. /// </remarks> // public static PixelFormat PixelFormat // { // get // { // return PixelFormat.Format32bppArgb; // } // } /// <summary> /// Returns a new ColorBgra with the same color values but with a new alpha component value. /// </summary> public ColorBgra NewAlpha(byte newA) { return(ColorBgra.FromBgra(B, G, R, newA)); }