Select row that you want to change color, select conditional formatting from the ribbon and click new rule, select "use formula to determine which cells to format" then use the following formula
=$H2="Teacher 1" then click the format button, click on fill, select a color from the options and click ok, then click ok again and then apply
do this reportedly until you have the number of teachers you require then press ok on the rules manager page
now click on format painter from the ribbon and select all other rows
hope this helps
Craig