public Color getColor() {
        try {
            int newR = Integer.parseInt(jTextField1.getText());
            int newG = Integer.parseInt(jTextField2.getText());
            int newB = Integer.parseInt(jTextField3.getText());
            int newA = Integer.parseInt(jTextField4.getText());

            r = newR;
            g = newG;
            b = newB;
            a = newA;

        } catch (NumberFormatException e) {
        }
        return new Color(r, g, b,a);
    }