Wiring colors can vary, so focus on the functions of each wire rather than the colors. Consult the thermostat's manual and the wiring diagram to match the functions to the correct terminals.