code: private float brightness(int color) {
          int r = (color >> 16) & 0xFF;
          int g = (color >> 8) & 0xFF;
          int b = color & 0xFF;
  
          int V = Math.max(b, Math.max(r, g));
          return (V / 255.f);
      }
docs: Returns the brightness component of a color int. Taken from android.graphics.Color.
  
  @return A value between 0.0f and 1.0f