the order of colors is alphabetic, exdept for red and purple which are switched: BGRPWY and yellow goes to blue if you click right, and blue turns to yellow if you click left.

then, from bottom to top, you just see which way is quickest.

example:

WGW

RBR

GYG

PGP

for G to go to P (bottom row) you do two right turns

for Y to go to G you need 2 right turns

for B to go to R you need 2 right turns

for G to go to W you can do 3 left or 3 right.

typically the solution will either be RLLL, LLLR, RRRL, LRRR, or all left or all right.