Confounds

In that example, there is a potential confound between the pattern of the maze and the color.

The easiest way to eliminate it would be to only use one pattern. Make all five colored mazes the same pattern.

One problem with this approach is that it would increase the probability of a practice effect.
Another problem is that the results of the experiment would suffer from a lack of generalizability. That is, one could argue that even if you found, for example, that rats ran a green maze faster than any others, you would not be sure that this result would apply to situations other than that exact maze.

A different way to remove the confound would be to have each of the five patterns in each of the colors. But that could create other difficulties. You would now have 25 different mazes instead of just 5.

If you already have to divide your 12 rats into groups to run 2, 5, or 10 different orderings of the colors, then what are you going to do about the fact that each color now comes in 5 patterns? Do you multiply the number of rats you use times 5? Or do you have each rat run 5 times as many mazes. It may be difficult to drastically increase the number of rats you use because of the cost, time, etc. If you multiply the number of mazes the rats run, there is also an increase in time, and it makes the potential carryover effects that much more complicated.

This illustrates that the solutions to problems of experimental design are often a matter not only of ingenuity, but also of judgment and compromise.