In the past I've gotten Rainbow in the Dark's puzzle unlocked with...
1. Top-left
2. Top-right
3. Bottom
4. Top
5. Bottom-right (May have been bottom-left)
6. bottom-left (May have been bottom-right)
Most of the time it fails, but every once in a while it works. I've wanted to test if there is a correlation between the other random parts of the dungeon and the solution, since it'd be neat to be able to always solve it.
Some notes I had from that quest were...
"Dungeon layout: no pits at first beholder, trap with regular fire elementals (No teleport) at first gate after beholder, pits at east of gate to crest, just gelatinous cube at rest shrines past crest, no pit towards gnolls, no trap at near the end. I forget if it changes but it was all earth elementals at the first drop and the cavey part past the rest shrines, I feel like sometimes there are rust monsters. Interestingly didn't see any teleport traps"