public Color getColor(Point p) {
        int radius = Math.min(getWidth() / 2, getHeight() / 2) - 20;
        double r = euclid(mousePosn, new Point(getWidth() / 2, getHeight() / 2));
        double deg = Math.atan2(getHeight() / 2 - mousePosn.y, getWidth() / 2 - mousePosn.x) * 180 / Math.PI + 180;
        try {
            double[] d = Colors.toRGB(deg, saturation, r / radius);
            return new Color((int) d[0], (int) d[1], (int) d[2]);
        } catch (Exception e) {
            return Color.WHITE;
        }
    }