private String replaceHexWithNames(String line) {

		int indexOfhash = line.indexOf("#");
		if (line.length() >= 7 && indexOfhash != -1 && indexOfhash + 7 <= line.length()) {
			String colorHex = line.substring(indexOfhash + 1, indexOfhash + 7);
			int endOfHex = -1;
			if (colorHex.matches("[a-fA-F0-9][a-fA-F0-9][a-fA-F0-9][a-fA-F0-9][a-fA-F0-9][a-fA-F0-9]")) {
				endOfHex = indexOfhash + 7;
			} else {
				colorHex = line.substring(indexOfhash + 1, indexOfhash + 4);
				if (colorHex.matches("[a-fA-F0-9][a-fA-F0-9][a-fA-F0-9]")) {
					endOfHex = indexOfhash + 4;
				}
			}

			//System.out.println(colorHex + " " + indexOfhash + ")(" + endOfHex);
			if (hexToColors.containsKey(colorHex)) {
				colorHex = hexToColors.get(colorHex);
			}
		}


		return line;
	}