The match or puzzle board is completely random. It reshuffles when there are no combinations found. It is not related to team strengths or the players, however, the colors correspond to the Elemental type of your heroes. Make sure to check the icon in the top left corner of your screen to see which color combinations deal optimal damage.
You can find more information on Elements here: What-are-Elements