I got the idea from a book called Mind Performance Hacks (the first book on memory that I read).
Practical example: Learn How to Memorize the Order of Black & Red in a Deck of Playing Cards
The basic pattern might have originated with the Vaughn Cube.