Background
I wrote up a web-based sketchpad that lets the user pick from a series of colours, and tracks the recently selected colours for ease of use. I randomly had this idea as a personal puzzle, but couldn't figure it out, so I thought I'd post it here.
The recent colour list follows 2 rules for when a colour is selected:
If the colour already exists in the list, it's moved up to the front of the list by swapping it with the tile that was previously at the front.
If the colour wasn't already in the list, it's prepended to the front, without any swapping taking place.
In the screenshot below:
The order of the colours selected leading to the above "Recent Colours" were:
Blue, Pink, Yellow, White, Black, Purple, Red, Green
The Problem
What order (if any) can you select colours from the quick bar to have the "Recent Colours" bar be in the same order as the "Quick Colours" bar above?
Hint: It's not as simple as selecting the colours in the reverse order of the "Quick Bar".