Example #1
0
 /// <summary>
 /// Initializes a new instance of the OfficeColor class.
 /// </summary>
 /// <param name="a">
 /// The alpha component of the color.
 /// </param>
 /// <param name="r">
 /// The red component of the color.
 /// </param>
 /// <param name="g">
 /// The green component of the color.
 /// </param>
 /// <param name="b">
 /// The blue component of the color.
 /// </param>
 /// <param name="pallet">
 /// The <see cref="OfficeColorPallet"/> this color is assigned to.
 /// </param>
 public OfficeColor(byte a, byte r, byte g, byte b, OfficeColorPallet pallet)
 {
     this.Pallet = pallet;
     this.A      = a;
     this.R      = r;
     this.G      = g;
     this.B      = b;
 }
 public OfficeColor(byte a, byte r, byte g, byte b, OfficeColorPallet pallet)
 {
     this._Pallet = pallet;
     this._A = a;
     this._R = r;
     this._G = g;
     this._B = b;
 }
 public OfficeColor(string color, OfficeColorPallet pallet)
 {
     Color c = (Color)ColorConverter.ConvertFromString(color);
     this._Pallet = pallet;
     this._A = c.A;
     this._R = c.R;
     this._G = c.G;
     this._B = c.B;
 }
Example #4
0
        /// <summary>
        /// Initializes a new instance of the OfficeColor class.
        /// </summary>
        /// <param name="color">
        /// The color that defines this office color.
        /// </param>
        /// <param name="pallet">
        /// The <see cref="OfficeColorPallet"/> this color is assigned to.
        /// </param>
        public OfficeColor(string color, OfficeColorPallet pallet)
        {
            var c = (Color)ColorConverter.ConvertFromString(color);

            this.Pallet = pallet;
            this.A      = c.A;
            this.R      = c.R;
            this.G      = c.G;
            this.B      = c.B;
        }
Example #5
0
 /// <summary>
 /// Initializes a new instance of the OfficeColor class.
 /// </summary>
 /// <param name="color">
 /// The color that defines this office color.
 /// </param>
 /// <param name="pallet">
 /// The <see cref="OfficeColorPallet"/> this color is assigned to.
 /// </param>
 public OfficeColor(Color color, OfficeColorPallet pallet)
     : this(color.A, color.R, color.G, color.B, pallet)
 {
 }
Example #6
0
 /// <summary>
 /// Initializes a new instance of the OfficeColor class.
 /// </summary>
 /// <param name="r">
 /// The red component byte value.
 /// </param>
 /// <param name="g">
 /// The green component byte value.
 /// </param>
 /// <param name="b">
 /// The blue component byte value.
 /// </param>
 /// <param name="pallet">
 /// The <see cref="OfficeColorPallet"/> this color is assigned to.
 /// </param>
 public OfficeColor(byte r, byte g, byte b, OfficeColorPallet pallet)
     : this(255, r, g, b, pallet)
 {
 }
 public OfficeColor(Color color, OfficeColorPallet pallet)
     : this(color.A, color.R, color.G, color.B, pallet)
 {
 }
 public OfficeColor(byte r, byte g, byte b, OfficeColorPallet pallet)
     : this(255, r, g, b, pallet)
 {
 }