Replacing colour of an Image

Another solution using the ColorMatrix class. You can use the Graphics.DrawImage overload that accepts an ImageAttributes argument. ImageAttributes.SetColorMatrix() sets the color-adjustment matrix, optionally targeting a specific category (Bitmap, Pen, Brush etc.) and can be instructed to skip the Gray Colors, modify the Gray colors only or all Colors. The ImageAttributes.SetThreshold() method allows to regulate the … Read more

Understanding the Use of ColorMatrix and ColorMatrixColorFilter to Modify a Drawable’s Hue

This is what I use for my game. This is the compilation of various part found on various articles on websites. Credits goes to the original author from the @see links. Note that a lot more can be done with color matrices. Including inverting, etc… public class ColorFilterGenerator { /** * Creates a HUE ajustment … Read more