This is a Rauzy puzzle box. The goal is to make the first and last columns have the same two colors (in opposite order). The buttons reorder the colors in a consistent, predictable way; figuring out how is part of the puzzle.
If you get stuck, press "Randomize" to try a new configuration.