private static int[] filterRgbDisabledImage(int[] rgbPixels, int[] destination,
			int brightnessPercent) {

		// preserve the luminance
		// Humans have the most sensitivity to green, least sensitivity to blue
		int r = (int) (0.30 * (rgbPixels[0] & 0xff));
		int g = (int) (0.59 * (rgbPixels[1] & 0xff));
		int b = (int) (0.11 * (rgbPixels[2] & 0xff));

		// average the values together to blend the pixels so that the image is not as crisp
		int gray = (r + g + b) / 3;

		gray = (255 - ((255 - gray) * (100 - brightnessPercent) / 100));
		gray = MathUtilities.clamp(gray, 0, 255);

		destination[0] = gray;
		destination[1] = gray;
		destination[2] = gray;
		destination[3] = rgbPixels[3];
		return destination;
	}
Takes in RGB pixel data and then converts the pixel into a gray color with a brightness
based upon <code>brightnessPercent</code>.
 
@param rgbPixels The RGB pixel data for a given pixel.
@param destination The converted pixel data.
@param brightnessPercent The amount of brightness to include in the gray value, where 100
       percent is the brightest possible value.
@return The <code>destination</code> array filled with the new pixel data.
Ghidra/Framework/Gui/src/main/java/generic/util/image/ImageUtils.java