Shortest path given correct order of colours?
Use a product construction, to construct a new graph whose vertices are given $(x,y,z,k)$, where $k$ counts the index into the sequence of colors (i.e., we are currently at $k$th vertex in that sequence).  Then, find the shortest path in this new graph using any standard shortest-path algorithm.  If all weights are non-negative, you can use Dijkstra's algorithm on this graph; otherwise you can use Bellman-Ford on this graph.
See How hard is finding the shortest path in a graph matching a given regular language?.  Your problem is a special case of the problem solved there.  (Possibly also useful: Product construction for given two finite automata .)
Specifically, here is how the product construction works in your setting.  Let $(c_1,c_2,\dots,c_q)$ be the desired sequence of colors.  Then, for each $k=1,2,\dots,q-1$, you'll have an edge $(x,y,z,k) \to (x,y,z,k+1)$ in the new graph if there is an edge $(x,y,z,c_k) \to (x,y,z,c_{k+1})$ in the original graph; the weight of the edge is copied over from the corresponding edge in the original graph.  Now, find the shortest path from $(x_0,y_0,z_0,1)$ to $(x_1,y_1,z_1,q)$ in the new graph, where $(x_0,y_0,z_0,c_1)$ is the starting vertex in the original graph and $(x_1,y_1,z_1,c_q)$ is the ending vertex in the original graph.