code: public static final int getGrey(final int color, final int redWeight, final int greenWeight, final int blueWeight){
  		return (r(color)*redWeight + g(color)*greenWeight + b(color)*blueWeight)/(redWeight+blueWeight+greenWeight);
  	}
docs: Calculates a grey value from an RGB or ARGB value using specified
  weights for each R,G and B channel.
  <p>
  Weights are integer values so normalized weights need to be converted
  beforehand. E.g. normalized weights (0.33, 0.62, 0.05) would be have to
  be converted to integer weights (33, 62, 5).
  <p>
  When using weights with same signs, the value is within [0..255]. When
  weights have mixed signs the resulting value is unbounded.
  @param color RGB(24bit) or ARGB(32bit) value
  @param redWeight weight for red channel
  @param greenWeight weight for green channel
  @param blueWeight weight for blue channel
  @return weighted grey value (8bit) of RGB color value for non-negative weights.
  @throws ArithmeticException divide by zero if the weights sum up to 0.
  @see #getLuminance(int)
  @since 1.0