private int getColorValue(String inputComponent, BufferedImage image, int x, int y) {
        int value;

        switch (inputComponent) {
            case "a":
                value = getA(image, x, y);
                break;
            case "r":
                value = getR(image, x, y);
                break;
            case "g":
                value = getG(image, x, y);
                break;
            case "b":
                value = getB(image, x, y);
                break;
            default:
                value = 0;
        }

        return value;
    }