public void addColourStop(Double progress, Color c) {
        if (progress >= 0.0 && progress <= 1.0) {
            colours.put(progress, c);
        } else {
            throw new IllegalArgumentException(progress + " is not a valid ratio.");
        }
    }