public static Image createDisabledImage(Image image, final int brightnessPercent) {

		Objects.requireNonNull(image);

		BufferedImage srcImage = new BufferedImage(image.getWidth(null), image.getHeight(null),
			BufferedImage.TYPE_INT_ARGB);
		Graphics graphics = srcImage.getGraphics();
		graphics.drawImage(image, 0, 0, null);
		graphics.dispose();

		BufferedImage destImage = new BufferedImage(image.getWidth(null), image.getHeight(null),
			BufferedImage.TYPE_INT_ARGB);
		LookupTable table = new LookupTable(0, 4) {
			@Override
			// overridden to pass in the complete pixel data
			public int[] lookupPixel(int[] src, int[] dest) {
				return filterRgbDisabledImage(src, dest, brightnessPercent);
			}
		};

		LookupOp lookupOp = new LookupOp(table, null);
		lookupOp.filter(srcImage, destImage);
		return destImage;
	}
Creates a disabled version of the given image.  The disabled version will be grayed
and have the varying gray levels blended together.

@param image the image to disable
@param brightnessPercent the amount of brightness to apply; 0-100
@return the new image
Ghidra/Framework/Gui/src/main/java/generic/util/image/ImageUtils.java