/// <summary> /// Initializes a new instance of the <see cref="Color"/> struct. Alpha is set to 255. Passed values are clamped within byte range. /// </summary> /// <param name="red">The red component of the color.</param> /// <param name="green">The green component of the color.</param> /// <param name="blue">The blue component of the color.</param> public Color(int red, int green, int blue) : this() { R = PackHelpers.ToByte(red); G = PackHelpers.ToByte(green); B = PackHelpers.ToByte(blue); A = 255; }
/// <summary> /// Initializes a new instance of the <see cref="Color"/> struct. Passed values are clamped within byte range. /// </summary> /// <param name="red">The red component of the color.</param> /// <param name="green">The green component of the color.</param> /// <param name="blue">The blue component of the color.</param> /// <param name="alpha">The alpha component of the color</param> public Color(int red, int green, int blue, int alpha) : this() { R = PackHelpers.ToByte(red); G = PackHelpers.ToByte(green); B = PackHelpers.ToByte(blue); A = PackHelpers.ToByte(alpha); }