@Override
		public int filterRGB(int x, int y, int rgb) {
			// Use NTSC conversion formula.
			int gray = (int)(0.30 * (rgb >> 16 & 0xff) +
				0.59 * (rgb >> 8 & 0xff) +
				0.11 * (rgb & 0xff));

			if (brightness >= 0) {
				gray = (int)((gray + brightness * 255) / (1 + brightness));
			}
			else {
				gray = (int)(gray / (1 - brightness));
			}

			if (contrast >= 0) {
				if (gray >= 127) {
					gray = (int)(gray + (255 - gray) * contrast);
				}
				else {
					gray = (int)(gray - gray * contrast);
				}
			}
			else {
				gray = (int)(127 + (gray - 127) * (contrast + 1));
			}

			int a = ((rgb >> 24) & 0xff) * alpha / 100;

			return (a << 24) | (gray << 16) | (gray << 8) | gray;
		}
@param brightness in range [-100..100] where 0 has no effect
@param contrast in range [-100..100] where 0 has no effect
@param alpha in range [0..100] where 0 is transparent, 100 has no effect
flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatDisabledIconsTest.java