multiply two color - CSharp System.Drawing

CSharp examples for System.Drawing:Color Calculation

Description

multiply two color

Demo Code


using Microsoft.Xna.Framework;
using System;/*from   w  w  w .ja v a 2  s. c  o  m*/

public class Main{
        public static Color multiply( this Color self, Color second )
      {
         return new Color {
            R = (byte)( self.R * second.R ),
            G = (byte)( self.G * second.G ),
            B = (byte)( self.B * second.B ),
            A = (byte)( self.A * second.A )
         };
      }
}

Related Tutorials