@@ -0,0 +1,1266 @@
+package me.lexjoy.utils;%0A%0Aimport me.lexjoy.widget.fill_drawable.FillDrawableFactory;%0A%0Aimport android.content.res.Resources;%0Aimport android.graphics.Color;%0Aimport android.graphics.drawable.Drawable;%0A%0Apublic class ColorUtils %7B%0A%0A  /**%0A   * %3Cpre%3E%0A   * gray = r * 0.299 + g * 0.587 + b * 0.114%0A   *      = r %3E%3E%3E 2,5,6,9,13,15,16%0A   *      + g %3E%3E%3E 1,4,6,7,10,14,16%0A   *      + b %3E%3E%3E 3,4,5,7,10,12,13,14%0A   * since:%0A   *   0xff %3E%3E%3E 8 = 0;%0A   * %0A   * gray = r %3E%3E%3E 2,5,6%0A   *      + g %3E%3E%3E 1,4,6,7%0A   *      + b %3E%3E%3E 3,4,5,7%0A   * %3C/pre%3E%0A   * %0A   * @param color%0A   * @return%0A   */%0A  public static int measureGray(int color) %7B%0A    return NumericUtils.sumRightShifts(Color.red  (color), 2, 5, 6   )%0A        +  NumericUtils.sumRightShifts(Color.green(color), 1, 4, 6, 7)%0A        +  NumericUtils.sumRightShifts(Color.blue (color), 3, 4, 5, 7);%0A  %7D%0A%0A  public static Drawable fill(Resources resources, int drawableId, int color, boolean fitDark) %7B%0A    return new FillDrawableFactory(resources, drawableId).getDrawable(color, fitDark);%0A  %7D%0A%0A  public static Drawable fillByResources(Resources resources, int drawableId, int colorId, boolean fitDark) %7B%0A    return new FillDrawableFactory(resources, drawableId).getDrawableByResources(colorId, fitDark);%0A  %7D%0A%0A  private ColorUtils() %7B%7D%0A%0A%7D%0A

Create ColorUtils.java