private static int[] filterRgbChangeColor(int[] rgbPixels, int[] destination, int[] oldRgb,
			int[] newRgb) {

		int r = rgbPixels[0] & 0xff;
		int g = rgbPixels[1] & 0xff;
		int b = rgbPixels[2] & 0xff;

		int oldR = oldRgb[0];
		int oldG = oldRgb[1];
		int oldB = oldRgb[2];

		if (r == oldR && g == oldG && b == oldB) {
			destination[0] = newRgb[0];
			destination[1] = newRgb[1];
			destination[2] = newRgb[2];
		}
		else {
			destination[0] = r;
			destination[1] = g;
			destination[2] = b;
		}

		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