Robi Kaka's Cube

Our beloved Robi Kaka has invented a cube. You have to solve only one side of this cube – a square of $N\times N$ cells. Every cell has $4$ colors – Red, Blue, Green, Yellow stripes drawn in clockwise direction one after another. There is also a white rotating button in the middle of each cell. Tapping it once rotates the cell $90°$ in clockwise direction.

This is a companion discussion topic for the original entry at https://toph.co/p/robi-kaka-s-cube