public int[] getMenuLocationValuesSpiral(int color, final double tolerance, int x, int y, int distance) {
		int minX = 0;
		int maxX = 0;
		int minY = 0;
		int maxY = 0;
		int count = 0;
		int amount = 0;
		int temp = 0;
		boolean[] check = new boolean[2];
		while((amount / 2) <= distance) {
			if(x > 0 && x < Bot.WIDTH && y > 0 && y < Bot.HEIGHT && isInTolerance(getData(x, y), color, tolerance)) {
				if(minX == 0 || x < minX)
					minX = x;
				if(maxX == 0 || x > maxX)
					maxX = x;
				if(minY == 0 || y < minY)
					minY = y;
				if(maxY == 0 || y > maxY)
					maxY = y;
			}
			if(count == 0) {
				if(!check[0]) {
					amount++;
					check[0] = true;
				}
				x += 1;
				temp++;
				if(temp == amount) {
					count++;
					temp = 0;
					check[0] = false;
				}
			} else if(count == 1) {
				y += 1;
				temp++;
				if(temp == amount) {
					count++;
					temp = 0;
				}
			} else if(count == 2) {
				if(!check[1]) {
					amount++;
					check[1] = true;
				}
				x -= 1;
				temp++;
				if(temp == amount) {
					count++;
					temp = 0;
					check[1] = false;
				}
			} else if(count == 3) {
				y -= 1;
				temp++;
				if(temp == amount) {
					count = 0;
					temp = 0;
				}
			}
		}
		return new int[] { minX, minY, maxX, maxY };
	}