I sort my students into groups of four, based on how much they need me when they are struggling with a topic. Then I take groups of four and put their names in individual columns. Left most column is the 4 lowest kids that need the most help and the right most column are the kids that can pretty much figure stuff out whether I am there or not. These are their Color groups.
If I want heterogeneous groups, I just use the kids in each row. The groups are a little bigger, but I can easily them up into smaller groups by splitting the columns. If I don't like a group, I can move the column names around and mix it up.
Red Yellow Blue Green Purple
1 James Nicole Ginny Eamon George
2 Becca Andrew Phil Bridget Sammy
3 Joe Connor Nina Lauren Robin
4 Chris Colin Chrissy Grace Maggie
5 Jack Aiden Mike Rob Will
So let's say in the Yellow Group Ginny and Chrissy are in a fight because of Mike. Well, heterogeneously, they can just switch number groups and stay in their column.