/// <summary>constructor taking a 32 bit color</summary> /// <param name="rgba">the color to init with</param> public Rgba5551(Rgba rgba) { this.Bits = (ushort)(rgba.R >> 3 << 11 | rgba.G >> 3 << 6 | rgba.B >> 3 << 1 | rgba.A >> 7); }
/// <summary>constructor taking a 32 bit color</summary> /// <param name="rgba">the color to init with</param> public Rgba4444(Rgba rgba) { this.Bits = (ushort)(rgba.R >> 4 << 12 | rgba.G >> 4 << 8 | rgba.B >> 4 << 4 | rgba.A >> 4); }