예제 #1
0
 /// <summary>
 /// Gets the averaged value of a color's RGB.
 /// </summary>
 /// <param name="c"></param>
 /// <returns></returns>
 public static float AvgRGB(Color c)
 {
     return((float)XNAColorLibraries.SumRGB(c) / 3f);
 }
예제 #2
0
 /// <summary>
 /// Gets the averaged value of a color's RGBA.
 /// </summary>
 /// <param name="c"></param>
 /// <returns></returns>
 public static float AvgRGBA(Color c)
 {
     return((float)XNAColorLibraries.SumRGBA(c) * 0.25f);
 }