When iterating through a group of 15 users to create a table row for each user, I am interested in randomly choosing a color from my theme's array of 4 colors for each user. How can I efficiently ensure that no two identical colors are next to each other?
Furthermore, is there a way to generate the colors in a way that appears as random as possible on a larger scale? I want to avoid a pattern where it looks like I am simply cycling through the 4 colors in order, resulting in the same sequence every 4 users.