code: @Override
      protected Integer theCalculation(Bitmap image) {
          Map histogram = new HashMap();
  
          for(int i = 0; i < image.getWidth(); i++)
              for(int j = 0; j < image.getHeight(); j++) {
                  int rgb = image.getPixel(i,j);
  
                  int rgbArray[] = getRGBArrayFromPixel(rgb);
  
                  if(!isGray(rgbArray)) {
  
                      Integer counter = (Integer) histogram.get(rgb);
  
                      if (counter == null)
                          counter = 0;
                      counter++;
  
                      histogram.put(rgb, counter);
                  }
              }
  
          return Color.parseColor("#"+getMostCommonColor(histogram));
      }
docs: http://stackoverflow.com/questions/8471236/finding-the-dominant-color-of-an-image-in-an-android-drawable