Averaging

The Color Pro package includes functions for averaging colors together. These functions are declared as extension methods in the static class Averaging.

// Average between two colors
Color average = color1.Average(color2);

// Average between an array of colors
Color average = colors.Average();

// Average color of the pixels of a Texture2D
Color average = texture2D.AverageColor();

🎚️ Averaging vs Mixing

If you are looking to combine colors then you usually get better results by mixing them instead of averaging them due to how they are calculated. See the Mixing manual for more information. Averaging is usually better suited for large amounts of data whereas mixing is better suited when you only have a couple colors.