code: public static double calculateLuminance(int color) {
          double r = linearColor(Color.red(color));
          double g = linearColor(Color.green(color));
          double b = linearColor(Color.blue(color));
          return 0.2126d * r + 0.7152d * g + 0.0722d * b;
      }
docs: Calculates the luminance value of a given {@code int} representation of {@link Color}.
  <p>
  Derived from formula at http://gmazzocato.altervista.org/colorwheel/algo.php
  
  @param color The {@link Color} to evaluate
  @return the luminance value of the given color