The current behaviour of selecting group color when we are creating a group: we are increasing an index and get the item with this index from a color array. If we create a group, then ungroup it and create a group again, the group color will be different because the index was increased in the background.
With this improvement we are checking which colors were used and how many times. The next color will be the first from the color array which was used the fewest times.
This PR improves the group coloring.
The current behaviour of selecting group color when we are creating a group: we are increasing an index and get the item with this index from a color array. If we create a group, then ungroup it and create a group again, the group color will be different because the index was increased in the background.
With this improvement we are checking which colors were used and how many times. The next color will be the first from the color array which was used the fewest times.