subtract two color - CSharp System.Drawing

CSharp examples for System.Drawing:Color Calculation

Description

subtract two color

Demo Code


using Microsoft.Xna.Framework;
using System;// w w  w.  j  a v  a2 s.  co m

public class Main{
        /// <summary>
      /// first - second
      /// </summary>
      /// <param name="first">First.</param>
      /// <param name="second">Second.</param>
      public static Color subtract( this Color color, Color second )
      {
         return new Color( color.R - second.R, color.G - second.G, color.B - second.B, color.A - second.A );
      }
}

Related Tutorials