private static void colorButton(CustomButton a) {

		double fileDate = 0;
		double earningsDate = 0;
		if (!a.getText().contains("_"))
			return;
		try {
			fileDate = Double.parseDouble(a.getText().split(" ")[0]);
			earningsDate = EarningsTest.singleton.dateFormatForFile.parse(
					a.getText().split(" ")[1]).getTime()
					/ (24 * 3600 * 1000);
		} catch (Exception e) {
			return;
		}
		int color = 120;
		if (earningsDate < EarningsTest.dayNumber()) {
			a.setBackground(new Color(color, color, color));
		} else {
			color = 150;
			double today = EarningsTest.dayNumber();
			while (today < earningsDate) {

				color += 15;
				if (color > 255)
					color = 255;
				today += 2;
			}
			a.setBackground(new Color(100, 100, color));
		}
	}