/// <summary> /// Initializes a new instance of the <see cref="Ravlyk.Drawing.Color"/> class. /// </summary> /// <param name="argb">32-bit (Alpha, Red, Green, Blue) color value.</param> /// <param name="a">Alpha color component.</param> /// <param name="r">Red color component.</param> /// <param name="g">Green color component.</param> /// <param name="b">Blue color component.</param> Color(int argb, byte a, byte r, byte g, byte b) { Debug.Assert(ColorBytes.ToArgb(a, r, g, b) == argb, "Color components should equal to combined value"); Argb = argb; A = a; R = r; G = g; B = b; }
/// <summary> /// Initializes a new instance of the <see cref="Ravlyk.Drawing.Color"/> class and inits its internal <see cref="Argb"/> by (Red, Green, Blue) color components. /// </summary> /// <param name="a">Alpha color component.</param> /// <param name="r">Red color component.</param> /// <param name="g">Green color component.</param> /// <param name="b">Blue color component.</param> public Color(byte a, byte r, byte g, byte b) : this(ColorBytes.ToArgb(a, r, g, b), a, r, g, b) { }