public void updateTileBar(ArrayList<Integer> pages, Color c, int RedGreenOrBlue){
    	for(int i = 0;i < pages.size(); i++){
			if(pointersToRecolors[pages.get(i) - startingPage] == null){
				addPortion(pages.get(i)-startingPage, c);
			}
			else {
				Color currentPanelColor = pointersToRecolors[pages.get(i) - startingPage].getBackground();
				if(RedGreenOrBlue == 1){
					if(currentPanelColor.getColorComponents(null)[0]+c.getColorComponents(null)[0] < 1){
						updatePortion(pages.get(i)-startingPage, new Color(currentPanelColor.getColorComponents(null)[0]+c.getColorComponents(null)[0], currentPanelColor.getColorComponents(null)[1], currentPanelColor.getColorComponents(null)[2]));
					}
					else {
						updatePortion(pages.get(i)-startingPage, new Color((float)1.0, currentPanelColor.getColorComponents(null)[1], currentPanelColor.getColorComponents(null)[2]));
					}
				}
				else if(RedGreenOrBlue == 2){
					if(currentPanelColor.getColorComponents(null)[1]+c.getColorComponents(null)[1] < 1){
						updatePortion(pages.get(i)-startingPage, new Color(currentPanelColor.getColorComponents(null)[0], currentPanelColor.getColorComponents(null)[1]+c.getColorComponents(null)[1], currentPanelColor.getColorComponents(null)[2]));
					}
					else {
						updatePortion(pages.get(i)-startingPage, new Color(currentPanelColor.getColorComponents(null)[0], (float)1.0, currentPanelColor.getColorComponents(null)[2]));
					}
				}
				else if(RedGreenOrBlue == 3){
					if(currentPanelColor.getColorComponents(null)[2]+c.getColorComponents(null)[2] < 1){
						updatePortion(pages.get(i)-startingPage, new Color(currentPanelColor.getColorComponents(null)[0], currentPanelColor.getColorComponents(null)[1], currentPanelColor.getColorComponents(null)[2]+c.getColorComponents(null)[2]));
					}
					else {
						updatePortion(pages.get(i)-startingPage, new Color(currentPanelColor.getColorComponents(null)[0], currentPanelColor.getColorComponents(null)[1], (float)1.0));
					}
				}
			}
		}
    }