code: private static double computeLuminance(int argb)
      {
          int r = (argb >> 16) & 0xFF;
          int g = (argb >>  8) & 0xFF;
          int b = (argb      ) & 0xFF;
          double nr = Math.pow((r / 255.0), 2.2);
          double ng = Math.pow((g / 255.0), 2.2);
          double nb = Math.pow((b / 255.0), 2.2);
          double y = 0.2126 * nr + 0.7151 * ng + 0.0721 * nb;
          return y;
      }
docs: Returns the luminance of the given ARGB color
  
  @param argb The ARGB color
  @return The luminance