public static float[] calcAvgHues(String[] files) throws Exception {
		// Load in the tile from all files
		WritableRaster[] wrs = loadTileSet(files, new Button());
		char[] ls = loadLetterSet(files);
		// Spaces for the colour number (0 to 6) and then the avg RGB for each
		// tile
		int[] corCols = new int[files.length * 117];
		int[][] rgbCols = new int[files.length * 117][3];
		// Populate then
		for (int i = 0; i < files.length * 117; i++) {
			corCols[i] = WordBuilder.charColours[ls[i] - 'a'];
			rgbCols[i] = avgTileColour(wrs[i]);
		}
		// Calculate statistics
		int[][] sumRGB = new int[7][3];
		int[] n = new int[7];
		for (int i = 0; i < 7; i++) {
			sumRGB[i] = new int[] { 0, 0, 0 };
			n[i] = 0;
		}
		for (int i = 0; i < corCols.length; i++) {
			n[corCols[i]]++;
			sumRGB[corCols[i]][0] += rgbCols[i][0];
			sumRGB[corCols[i]][1] += rgbCols[i][1];
			sumRGB[corCols[i]][2] += rgbCols[i][2];
		}
		// Average hue for each of the 7 colours
		float[] avgHue = new float[7];
		for (int i = 0; i < 7; i++) {
			int avgR = Math.round(sumRGB[i][0] / n[i]);
			int avgG = Math.round(sumRGB[i][1] / n[i]);
			int avgB = Math.round(sumRGB[i][2] / n[i]);
			avgHue[i] = rgbToHue(new int[] { avgR, avgG, avgB });
		}
		// Start of std dev.
		float[] stdHue = new float[7];
		for (int i = 0; i < 7; i++) {
			stdHue[i] = 0;
		}
		n = new int[7];
		for (int i = 0; i < 7; i++) {
			n[i] = 0;
		}
		for (int i = 0; i < rgbCols.length; i++) {
			float ad1 = Math.abs(avgHue[corCols[i]] - rgbToHue(rgbCols[i]));
			float ad2 = 360 - ad1;
			stdHue[corCols[i]] += Math.min(ad1, ad2);
			n[corCols[i]]++;
		}
		for (int i = 0; i < 7; i++) {
			stdHue[i] = stdHue[i] / n[i];
		}
		for (int i = 0; i < 7; i++) {
			System.out.print(i + " ");
			System.out.print(avgHue[i] + "\t");
			System.out.println(stdHue[i]);
		}
		return avgHue;
	}